text
stringlengths
1
2.83M
id
stringlengths
16
152
metadata
dict
__index_level_0__
int64
0
949
--- title: Dialog Styles --- :::note - In [OnDialogResponse](../callbacks/OnDialogResponse), pressing **button1** sets **response** to **1**, while pressing **button2** sets **response** to **0**. - Every dialog can have an optional button 2. To make it disappear leave it empty, like in the first example. Players won't be able to click it, but they will be able to press ESC and trigger [OnDialogResponse](../callbacks/OnDialogResponse) with **response** = **0**. - [ShowPlayerDialog](../functions/ShowPlayerDialog): Color embedding can be used for every string: **caption**, **info**, **button1** and **button2**. ::: - This page describes the behavior of [ShowPlayerDialog](../functions/ShowPlayerDialog) and [OnDialogResponse](../callbacks/OnDialogResponse). - For various limitations, visit the [Limits](../resources/limits) page. - For the response examples, this code will be used: ```c public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) { printf( "playerid = %d, dialogid = YOUR_DIALOGID, response = %d, listitem = %d, inputtext = '%s' (size: %d)", playerid, response, listitem, inputtext, strlen( inputtext ) ); return 1; } ``` ## Style 0: `DIALOG_STYLE_MSGBOX` ![](/images/dialogStyles/Dialog_style_msgbox.png) Showing: :::note - **\t** adds a TAB (more space). - **\n** creates a new line. - Color Embedding won't reset after \n \t ::: ```c ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_MSGBOX, "Caption", "Info\n\tInfo", "Button 1", ""); ``` ### Response Output :::note - **listitem** is always **-1**. - **inputtext** is always empty. ::: ```c // pressed the button playerid = 0, dialogid = YOUR_DIALOGID, response = 1, listitem = -1, inputtext = '' (size: 0) // pressed ESC (as the second button isn't visible) playerid = 0, dialogid = YOUR_DIALOGID, response = 0, listitem = -1, inputtext = '' (size: 0) ``` ## Style 1: `DIALOG_STYLE_INPUT` ![](/images/dialogStyles/Dialog_style_input.png) Showing: :::note - **\t** adds a TAB (more space). - **\n** creates a new line. - Color Embedding won't reset after \n \t ::: ```c ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_INPUT, "Caption", "Enter information below:", "Button 1", "Button 2"); ``` ### Response Output :::note - **listitem** is always **-1**. - **inputtext** is the text written by the user, including colors. ::: ```c // wrote "input" and pressed the left button playerid = 0, dialogid = YOUR_DIALOGID, response = 1, listitem = -1, inputtext = 'input' (size: 5) // wrote "input" and pressed the right button playerid = 0, dialogid = YOUR_DIALOGID, response = 0, listitem = -1, inputtext = 'input' (size: 5) ``` ## Style 2: `DIALOG_STYLE_LIST` ![](/images/dialogStyles/Dialog_style_list.png) Showing: :::note - **\t** adds a TAB (more space). - **\n** creates a new line. - Color Embedding won't reset after \n \t ::: ```c ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_LIST, "Caption", "Item 0\n{FFFF00}Item 1\nItem 2", "Button 1", "Button 2"); ``` ### Response output: :::note - **listitem** is the number of the selected item, starting from **0**. - **inputtext** is the text contained by the selected listitem, without the colors. ::: ```c // selected the first list item and pressed the left button playerid = 0, dialogid = YOUR_DIALOGID, response = 1, listitem = 0, inputtext = 'Item 0' (size: 6) // selected the second list item and pressed the right button playerid = 0, dialogid = YOUR_DIALOGID, response = 0, listitem = 1, inputtext = 'Item 1' (size: 6) ``` ## Style 3: `DIALOG_STYLE_PASSWORD` :::note - Similar to **DIALOG_STYLE_INPUT**. ::: ![](/images/dialogStyles/Dialog_style_password.png) Showing: :::note - **\t** adds a TAB (more space). - **\n** creates a new line. ::: ```c ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_PASSWORD, "Caption", "Enter private information below:", "Button 1", "Button 2"); ``` ### Response Output :::note - **listitem** is always **-1**. - **inputtext** is the text contained by the selected listitem, without the colors. ::: ```c // wrote "input" and pressed the left button playerid = 0, dialogid = YOUR_DIALOGID, response = 1, listitem = -1, inputtext = 'input' (size: 5) // wrote "input" and pressed the right button playerid = 0, dialogid = YOUR_DIALOGID, response = 0, listitem = -1, inputtext = 'input' (size: 5) ``` ## Style 4: `DIALOG_STYLE_TABLIST` :::tip This style was added in **SA-MP 0.3.7** and will not work in earlier versions! ::: :::note - Similar to **DIALOG_STYLE_LIST**. ::: ![](/images/dialogStyles/Dialog_style_tablist.png) Showing: :::note - **\t** creates a new column. - **\n** creates a new list item. - Color embedding resets after \n and \t. The first **info** row contains the header. ::: ```c ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_TABLIST, "Caption", "Deagle\t$5000\t100\n\ {FF0000}Sawnoff\t{33AA33}$5000\t100\n\ Pistol\t$1000\t50", "Button 1", "Button 2"); ``` :::note - **inputtext** is the text contained by the _first column_ of the selected **listitem**, without the colors. ::: ```c // selected the first list item and pressed the left button playerid = 0, dialogid = YOUR_DIALOGID, response = 1, listitem = 0, inputtext = 'Deagle' (size: 6) // selected the second list item and pressed the right button playerid = 0, dialogid = YOUR_DIALOGID, response = 0, listitem = 1, inputtext = 'Sawnoff' (size: 7) ``` ## Style 5: `DIALOG_STYLE_TABLIST_HEADERS` :::tip This style was added in **SA-MP 0.3.7** and will not work in earlier versions! ::: :::note - Similar to **DIALOG_STYLE_LIST**. ::: ![](/images/dialogStyles/Dialog_style_tablist_headers.png) Showing: :::note - **\t** creates a new column. - **\n** creates a new list item. - Color embedding resets after \n and \t. The first **info** row contains the header. ::: ```c ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_TABLIST_HEADERS, "Caption", "Header 1\tHeader 2\tHeader 3\n\ Item 1 Column 1\tItem 1 Column 2\tItem 1 Column 3\n\ {FF0000}Item 2 Column 1\t{33AA33}Item 2 Column 2\tItem 2 Column 3", "Button 1", "Button 2"); ``` :::note - **inputtext** is the text contained by the _first column_ of the selected **listitem**, without the colors. ::: ```c // selected the first list item and pressed the left button playerid = 0, dialogid = YOUR_DIALOGID, response = 1, listitem = 0, inputtext = 'Item 1 Column 1' (size: 15) // selected the first list item and pressed the right button playerid = 0, dialogid = YOUR_DIALOGID, response = 0, listitem = 1, inputtext = 'Item 2 Column 1' (size: 15) ```
openmultiplayer/web/docs/translations/th/scripting/resources/dialogstyles.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/dialogstyles.md", "repo_id": "openmultiplayer", "token_count": 2389 }
500
--- title: Material Text Sizes description: A list of Material Text Sizes --- | ID | Value | | ---------------------------- | ----- | | OBJECT_MATERIAL_SIZE_32x32 | 10 | | OBJECT_MATERIAL_SIZE_64x32 | 20 | | OBJECT_MATERIAL_SIZE_64x64 | 30 | | OBJECT_MATERIAL_SIZE_128x32 | 40 | | OBJECT_MATERIAL_SIZE_128x64 | 50 | | OBJECT_MATERIAL_SIZE_128x128 | 60 | | OBJECT_MATERIAL_SIZE_256x32 | 70 | | OBJECT_MATERIAL_SIZE_256x64 | 80 | | OBJECT_MATERIAL_SIZE_256x128 | 90 | | OBJECT_MATERIAL_SIZE_256x256 | 100 | | OBJECT_MATERIAL_SIZE_512x64 | 110 | | OBJECT_MATERIAL_SIZE_512x128 | 120 | | OBJECT_MATERIAL_SIZE_512x256 | 130 | | OBJECT_MATERIAL_SIZE_512x512 | 140 | ## ฟังก์ชั่นที่เกี่ยวข้องกัน - [SetObjectMaterialText](/docs/scripting/functions/SetObjectMaterialText): Replace the texture of an object with text.
openmultiplayer/web/docs/translations/th/scripting/resources/materialtextsizes.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/materialtextsizes.md", "repo_id": "openmultiplayer", "token_count": 433 }
501
--- title: Starting IDs description: Everything like objects, players or vehicles use IDs. Some IDs start with 0, others start with 1. sidebar_label: Starting IDs --- Everything like objects, players or vehicles use IDs. Some IDs start with 0, others start with 1. | Type | Starting ID | | ------------------------- | ----------- | | 3D Text Label | 0 | | Actor | 0 | | File | 0 | | GangZone | 0 | | Object | 1 | | Pickup | 0 | | Player | 0 | | Player Class | 0 | | TextDraw / PlayerTextDraw | 0 | | Timer | 1 | | Vehicle | 1 | You see, vehicles and objects start using 1, not 0! So if you plan to use an array to hold all IDs you have to use the ID from CreateObject/CreateVehicle/... and subtract 1 to get the array element ID.
openmultiplayer/web/docs/translations/th/scripting/resources/startingids.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/startingids.md", "repo_id": "openmultiplayer", "token_count": 520 }
502
--- title: การสอน description: ชุดแบบฝึกหัดที่จะช่วยคุณในการเขียนเกมโหมดและจัดการเซิร์ฟเวอร์ของคุณ --- ในส่วนนี้คุณจะพบกับชุดแบบฝึกหัดที่จะช่วยคุณในการเขียนเกมโหมดและจัดการเซิร์ฟเวอร์ของคุณ แบบฝึกหัดนี้ไม่มีลำดับเฉพาะ
openmultiplayer/web/docs/translations/th/tutorials/_.md/0
{ "file_path": "openmultiplayer/web/docs/translations/th/tutorials/_.md", "repo_id": "openmultiplayer", "token_count": 387 }
503
--- title: OnDialogResponse description: Bu callback, bir oyuncu ShowPlayerDialog kullanılarak gösterilen bir dialog içerisinde bir butona tıkladığında, ENTER / esc tuşlarına bastığında veya liste dialogu içerisindeki bir seçeneğe çift tıkladığında(bu seçenek için dialog'un stili list olmalıdır) tetiklenir. tags: [] --- ## Açıklama Bu callback, bir oyuncu ShowPlayerDialog kullanılarak gösterilen bir dialog içerisinde bir butona tıkladığında, ENTER / esc tuşlarına bastığında veya liste dialogu içerisindeki bir seçeneğe çift tıkladığında(bu seçenek için dialog'un stili list olmalıdır) tetiklenir. | Ad | Açıklama | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | playerid | Dialog'u tetikleyen oyuncunun id'si. | | dialogid | Tetiklenen dialog id'si. | | response | Yapılan işlemin sonucu. (sol düğme sonucu 1, sağ düğme sonucu 0 eğer yalnızca bir düğme varsa her zaman 1) | | listitem | Oyuncu tarafından seçilen liste id'si (0'dan başlar) (yalnızca liste stili dialoglar içerisinde kullanılıyorsa doğru sonuç verir, aksi takdirde -1 olacaktır). | | inputtext[] | Oyuncu tarafından veya liste stili dialoglarda metin girişine girilen metin. | ## Çalışınca Vereceği Sonuçlar Filterscriptler içerisinde 1 olarak döndürmek diğer filterscripts'lerin bunu okumasını engeller. ## Örnekler ```c // Dialog ID'sini tanımlayalım. #define DIALOG_RULES 1 // Herhangi bir komutun veya eventin içerisine yerleştirelim. ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Server Rules", "- No Cheating\n- No Spamming\n- Respect Admins\n\nDo you agree to these rules?", "Evet", "Hayır"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_RULES) { if(response) // Eğer Evet'e tıklarsa çalışacak işlem. { SendClientMessage(playerid, COLOR_GREEN, "Thank you for agreeing to the server rules!"); } else // Eğer ESC veya Hayır'a tıklarsa çalışacak işlem. { Kick(playerid); } return 1; // Bu dialogun işlemini çalıştırdık, bu yüzden 1 döndürdük. OnPlayerCommandText'de gösterilen örnek gibi. } return 0; // Burada return 0 döndürmelisiniz. Tıpkı OnPlayerCommandText'de gösterilen örnek gibi. } // Tekrar dialog ID'sini tanımlıyoruz. #define DIALOG_LOGIN 2 // Herhangi bir komutun veya eventin içerisine yerleştirelim. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Please enter your password:", "Login", "Cancel"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_LOGIN) { if(!response) // Cancel tuşuna basarsa çalışacak işlem. { Kick(playerid); } else // Eğer Cancel dışında bir işleme tıklarsa gerçekleşecek işlem. { if(CheckPassword(playerid, inputtext)) { SendClientMessage(playerid, COLOR_RED, "You are now logged in!"); } else { SendClientMessage(playerid, COLOR_RED, "LOGIN FAILED."); // Şifre yanlış olduğu için tekrar gösteriliyor. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Please enter your password:", "Login", "Cancel"); } } return 1; // Bu dialogun işlemini çalıştırdık, bu yüzden 1 döndürdük. OnPlayerCommandText'de gösterilen örnek gibi. } return 0; // Burada return 0 döndürmelisiniz. Tıpkı OnPlayerCommandText'de gösterilen örnek gibi. } #define DIALOG_WEAPONS 3 // Herhangi bir komutun veya eventin içerisine yerleştirelim. ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Desert Eagle\nAK-47\nCombat Shotgun", "Select", "Close"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_WEAPONS) { if(response) // Select'e tıklandığında çalışacak işlem. { // Oyuncuya seçtiği liste id'sine göre silah veriliyor. switch(listitem) { case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Desert Eagle veriliyor. case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // AK-47 veriliyor. case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Combat Shotgun veriliyor. } } return 1; // Bu dialogun işlemini çalıştırdık, bu yüzden 1 döndürdük. OnPlayerCommandText'de gösterilen örnek gibi. } return 0; // Burada return 0 döndürmelisiniz. Tıpkı OnPlayerCommandText'de gösterilen örnek gibi. } #define DIALOG_WEAPONS 3 // Herhangi bir komutun veya eventin içerisine yerleştirelim. ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Weapon\tAmmo\tPrice\n\ M4\t120\t500\n\ MP5\t90\t350\n\ AK-47\t120\t400", "Select", "Close"); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_WEAPONS) { if(response) // Select butonuna tıklandığında çalışır. { // Give them the weapon switch(listitem) { case 0: GivePlayerWeapon(playerid, WEAPON_M4, 120); // Give them an M4 case 1: GivePlayerWeapon(playerid, WEAPON_MP5, 90); // Give them an MP5 case 2: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47 } } return 1; // Bu dialogun işlemini çalıştırdık, bu yüzden 1 döndürdük. OnPlayerCommandText'de gösterilen örnek gibi. } return 0; // Burada return 0 döndürmelisiniz. Tıpkı OnPlayerCommandText'de gösterilen örnek gibi. } ``` ## Notlar :::tip Parametrelerde, dialog stillerine göre değişiklikler olabilir. (daha fazla örnek için tıklayın). ::: :::tip It is appropriate to switch through different dialogids, if you have many. ::: :::warning Bir oyuncunun dialogu oyun modu tekrar başlatıldığında gizlenmez, bu da sunucunun yeniden başlatıldıktan sonra bu dialog'un yanıt vermesi durumunda sunucunun (Warning:PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID") hatası vermesine neden olur. ::: ## Bağlantılı Fonksiyonlar - [ShowPlayerDialog](../../scripting/functions/ShowPlayerDialog.md): Oyuncuya dialog gösterir.
openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnDialogResponse.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnDialogResponse.md", "repo_id": "openmultiplayer", "token_count": 3489 }
504
--- title: OnPlayerEditAttachedObject description: Bu callback oyuncu üzerine takılan objenin düzenlemesini bitirdiğinde çağrılır. tags: ["player"] --- ## Açıklama Bu callback oyuncu üzerine takılan objenin düzenlemesini bitirdiğinde çağrılır. | Ad | Açıklama | |------------------------|-------------------------------------------------------------------| | playerid | Düzenlemeyi bitiren oyuncunun id'si. | | EDIT_RESPONSE:response | Eğer iptal ettiyse 0, kaydet tuşuna bastıysa 1 değerini döndürür. | | index | The index of the attached object (0-9) | | modelid | model id'si. | | boneid | objenin takıldığı kemik numarası. | | Float:fOffsetX | Editlenen objenin X offset'i. | | Float:fOffsetY | Editlenen objenin Y offset'i. | | Float:fOffsetZ | Editlenen objenin Z offset'i. | | Float:fRotX | Editlenen objenin X açısı. | | Float:fRotY | Editlenen objenin Y açısı. | | Float:fRotZ | Editlenen objenin Z açısı. | | Float:fScaleX | Editlenen objenin X skalası. | | Float:fScaleY | Editlenen objenin Y skalası. | | Float:fScaleZ | Editlenen objenin Z skalası. | ## Çalışınca Vereceği Sonuçlar 1 - Diğer filterscriptlerde çağrılmasını engeller. 0 - Diğer filterscriptlerde çağrılması için pas geçilir. Her zaman öncelikle filterscriptlerde çağrılır. ## Örnekler ```c enum attached_object_data { Float:ao_x, Float:ao_y, Float:ao_z, Float:ao_rx, Float:ao_ry, Float:ao_rz, Float:ao_sx, Float:ao_sy, Float:ao_sz } new ao[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][attached_object_data]; // Veriler bir arrayde tutulmalıdır. public OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ) { if (response) { SendClientMessage(playerid, COLOR_GREEN, "Obje başarıyla düzenlendi ve kaydedildi."); ao[playerid][index][ao_x] = fOffsetX; ao[playerid][index][ao_y] = fOffsetY; ao[playerid][index][ao_z] = fOffsetZ; ao[playerid][index][ao_rx] = fRotX; ao[playerid][index][ao_ry] = fRotY; ao[playerid][index][ao_rz] = fRotZ; ao[playerid][index][ao_sx] = fScaleX; ao[playerid][index][ao_sy] = fScaleY; ao[playerid][index][ao_sz] = fScaleZ; } else { SendClientMessage(playerid, COLOR_RED, "Obje kayıt edilmedi."); new i = index; SetPlayerAttachedObject(playerid, index, modelid, boneid, ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]); } return 1; } ``` ## Notlar :::warning Eğer 'response' parametresi 0 (iptal) gelirse objeyi eski haline döndürmek gerekir. Bunun için EditAttachedObject kullanmadan önce verileri bir arraye kayıt edin. ::: ## Bağlantılı Fonksiyonlar - [EditAttachedObject](../functions/EditAttachedObject): Üzerine takılan objeyi düzenleme. - [SetPlayerAttachedObject](../functions/SetPlayerAttachedObject): Oyuncunun üzerine obje takma.
openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEditAttachedObject.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEditAttachedObject.md", "repo_id": "openmultiplayer", "token_count": 2138 }
505
--- title: OnPlayerRequestClass description: Fonksiyon, bir oyuncu sınıf seçiminde sınıfını değiştirdiğinde (ve sınıf seçimi ilk göründüğünde) çağrılır. tags: ["player"] --- ## Açıklama Fonksiyon, bir oyuncu sınıf seçiminde sınıfını değiştirdiğinde (ve sınıf seçimi ilk göründüğünde) çağrılır. | Parametre | Açıklama | | --------- | --------------------------------------------------------------------------- | | playerid | Sınıfını değiştiren oyuncunun ID'si. | | classid | Görüntülenmekte olan sınıfın ID'si (AddPlayerClass tarafından döndürülür). | ## Çalışınca Vereceği Sonuçlar Filterscript komutlarında her zaman ilk olarak çağrılır. ## Örnekler ```c public OnPlayerRequestClass(playerid,classid) { if (classid == 3 && !IsPlayerAdmin(playerid)) { SendClientMessage(playerid, COLOR_RED, "Bu model sadece yöneticiler içindir!"); return 0; } return 1; } ``` ## Notlar :::tip Bu fonksiyon, bir oyuncu F4'e bastığında da çağrılır. ::: ## Bağlantılı Fonksiyonlar - [AddPlayerClass](../functions/AddPlayerClass): Sınıf ekleme.
openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestClass.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestClass.md", "repo_id": "openmultiplayer", "token_count": 627 }
506
--- title: OnUnoccupiedVehicleUpdate description: Bu fonksiyon, oyuncunun istemcisi sürmediği bir aracın konumunu güncellediğinde / senkronize ettiğinde çağrılır. tags: ["vehicle"] --- ## Açıklama Bu fonksiyon, oyuncunun istemcisi sürmediği bir aracın konumunu güncellediğinde / senkronize ettiğinde çağrılır. Bu, aracın dışında olan oyuncuda veya sürücüsü olmayan bir aracın yolcusu olduğunda meydana gelebilir. | Parametre | Açıklama | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | vehicleid | Konumu güncellenen aracın ID'si. | | playerid | Araç konumunu güncellemesini gönderen oyuncunun ID'si. | | passenger_seat | Oyuncu bir yolcu ise koltuğun ID'si. 0=araçta değil, 1=ön koltuk, 2=arka sol, 3=arka sağ, 4+ otobüs vb araçlar için. | | new_x | Aracın yeni X koordinatı. | | new_y | Aracın yeni Y koordinatı. | | new_z | Aracın yeni Z koordinatı. | | vel_x | Aracın yeni vektörel X koordinatı. | | vel_y | Aracın yeni vektörel Y koordinatı. | | vel_z | Aracın yeni vektörel Z koordinatı. | ## Çalışınca Vereceği Sonuçlar Filterscript dosyalarında her zaman ilk olarak çağrılır, bu nedenle 0 döndürmek diğer komut dosyalarının da görmesini engeller. ## Örnekler ```c public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z) { // Uzaklık kontrolü. if (GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z) > 50.0) { // Yapmak istediğiniz şey. return 0; } return 1; } ``` ## Notlar :::warning Bu fonksiyon, kullanılmayan araç başına saniyede çok sık çağrılır. Çağırdığınızda yoğun hesaplamalar veya yoğun dosya yazma / okuma işlemleri yapmaktan kaçınmalısınız. GetVehiclePos, araç değerleri güncellenmeden önce aracın eski koordinatlarını döndürecektir. ::: ## Bağlantılı Fonksiyonlar
openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnUnoccupiedVehicleUpdate.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnUnoccupiedVehicleUpdate.md", "repo_id": "openmultiplayer", "token_count": 1724 }
507
--- title: AddSimpleModelTimed description: İndirmek için yeni bir basit nesne modeli ekler. tags: [] --- :::warning Bu işlev SA-MP 0.3.DL R1'e eklenmiştir ve önceki sürümlerde çalışmayacaktır! ::: ## Açıklama İndirmek için yeni bir basit nesne modeli ekler. Model dosyaları oynatıcının belgelerinde saklanır. Belgelerim\Gta San Andreas User Files\SAMP\cache'te, CRC biçiminde dosya adında Sunucu IP'si ve Bağlantı Noktası klasörü altında saklanır. | İsim | Açıklama | | ------------ | ----------------------------------------------------------------------------------------------------------------------------- | | virtualworld | Modeli adresinde kullanılabilir hale getirmek için sanal dünya kimliği. Tüm dünyalar için -1 kullanın. | | baseid | Kullanılacak temel nesne model kimliği (indirme başarısız olduğunda kullanılacak orijinal nesne). | | newid | Yeni obje model kimliği daha sonra CreateObject veya CreatePlayerObject ile -1000 ile -30000 arasında (29000 yuva) sıralandı. | | dffname | Modellerde bulunan .dff modeli çarpışma dosyasının adı varsayılan olarak sunucu klasörü (çalışma yolu ayarı) | | txdname | Modeller sunucu klasöründe varsayılan olarak bulunan .txd model kaplama dosyasının adı (çalışma yolu ayarı). | | timeon | Dünya oyun zamanı (saat) bu nesne görünür. | | timeoff | Dünya oyun zamanı (saat) bu nesne kaybolacak. | ## Çalışınca Vereceği Sonuçlar 1: İşlev başarıyla yürütüldü. 0: İşlev yürütülemedi. ## Örnekler ```c public OnGameModeInit() { AddSimpleModelTimed(-1, 19379, -2000, "wallzzz.dff", "wallzzz.txd", 9, 18); // Bu duvar yalnızca 09:00 - 18:00 saatleri arasında işler. return 1; } ``` ## Notlar :::tip Sanal dünya ayarlandığında bunun çalışması için öncelikle sunucu ayarlarında userartwork etkinleştirilmesi gerekir; oynatıcı belirli bir dünyaya girdiğinde modeller indirilir. ::: :::warning Şu anda bu fonksiyonu ne zaman arayabileceğiniz konusunda herhangi bir kısıtlama yoktur, ancak OnFilterScriptInit/OnGameModeInit içinde aramamanız durumunda, halihazırda sunucuda bulunan bazı oyuncuların modelleri indirmemiş olma riskini çalıştırdığınızı unutmayın. ::: ## Bağlantılı Fonksiyonlar - [OnPlayerFinishedDownloading](../callbacks/OnPlayerFinishedDownloading.md): Bir oyuncu özel modelleri indirmeyi bitirdiğinde çağrılır.
openmultiplayer/web/docs/translations/tr/scripting/functions/AddSimpleModelTimed.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddSimpleModelTimed.md", "repo_id": "openmultiplayer", "token_count": 1438 }
508
--- title: AttachPlayerObjectToVehicle description: Oyuncu objesini araca bağlama. tags: ["player", "vehicle"] --- ## Açıklama Bir oyuncu objesini araca bağlar. | Parametre | Açıklama | | ------------- | --------------------------------------------------- | | playerid | Oyuncu objesi üzerine oluşturulmuş oyuncunun ID'si. | | objectid | Oyuncu objesinin ID'si. | | vehicleid | Üzerine bağlanılacak aracın ID'si. | | Float:OffsetX | Bağlanılacak X pozisyonunun değeri. | | Float:OffsetY | Bağlanılacak Y pozisyonunun değeri. | | Float:OffsetZ | Bağlanılacak Z pozisyonunun değeri. | | Float:RotX | Bağlanılacak X rotasyonunun değeri. | | Float:RotY | Bağlanılacak Y rotasyonunun değeri. | | Float:RotZ | Bağlanılacak Z rotasyonunun değeri. | ## Çalışınca Vereceği Sonuçlar Bu fonksiyon belirli bir değer döndürmez. ## Örnekler ```c public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate) { if (newstate == PLAYER_STATE_DRIVER) // Oyuncu durumu sürücü olarak değişirse. { new cow_object = CreatePlayerObject(playerid, 16442, 0, 0, 0, 0, 0, 0); // İnek objesini yaratıyoruz. AttachPlayerObjectToVehicle(playerid, cow_object, GetPlayerVehicleID(playerid), 0.0, 0.0, 1.0, 0.0, 0.0, 0.0); } } ``` ## Notlar :::tip Oyuncu objesi bir araca bağlanmadan önce oluşturulmalıdır. ::: ## Bağlantılı fonksiyonlar - [CreatePlayerObject](CreatePlayerObject): Oyuncu objesi oluşturma. - [DestroyPlayerObject](DestroyPlayerObject): Oyuncu objesi silme. - [IsValidPlayerObject](IsValidPlayerObject): Oyuncu objesinin oluşturulup oluşturulmadığını kontrol etme. - [MovePlayerObject](MovePlayerObject): Oyuncu objesini hareket ettirme. - [StopPlayerObject](StopPlayerObject): Hareket eden oyuncu objesini durdurma. - [SetPlayerObjectRot](SetPlayerObjectRot): Oyuncu objesinin rotasyonunu değiştirme. - [GetPlayerObjectPos](GetPlayerObjectPos): Oyuncu objesinin pozisyonunu kontrol etme. - [SetPlayerObjectPos](SetPlayerObjectPos): Oyuncu objesinin pozisyonunu değiştirme. - [GetPlayerObjectRot](GetPlayerObjectRot): Oyuncu objesinin rotasyonunu kontrol etme. - [AttachPlayerObjectToPlayer](AttachPlayerObjectToPlayer): Bir oyuncu objesini bir başka objeye bağlama. - [CreateObject](CreateObject): Obje oluşturma. - [DestroyObject](DestroyObject): Obje silme. - [IsValidObject](IsValidObject): Bir objenin oluşturulup oluşturulmadığını kontrol etme. - [MoveObject](MoveObject): Objeyi hareket ettirme. - [StopObject](StopObject): Hareket eden objeyi durdurma. - [SetObjectPos](SetObjectPos): Objenin pozisyonunu değiştirme. - [SetObjectRot](SetObjectRot): Objenin rotasyonunu değiştirme. - [GetObjectPos](GetObjectPos): Objenin pozisyonunu kontrol etme. - [GetObjectRot](GetObjectRot): Objenin rotasyonunu kontrol etme. - [AttachObjectToPlayer](AttachObjectToPlayer): Bir objeyi oyuncuya bağlama.
openmultiplayer/web/docs/translations/tr/scripting/functions/AttachPlayerObjectToVehicle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AttachPlayerObjectToVehicle.md", "repo_id": "openmultiplayer", "token_count": 1365 }
509
--- title: CreateMenu description: Menü oluşturma. tags: ["menu"] --- ## Açıklama Menü oluşturma. | Parametre | Açıklama | | --------------- | ----------------------------------------------------------------------------------- | | title[] | Menünün başlık metni. | | columns | Menü içerisinde kaç sütun olacağı. | | Float:x | Menünün X konumu. (640x460 tuval - 0 menüyü en sola yerleştirir). | | Float:y | Menünün Y konumu. (640x460 tuval - 0 menüyü en üste koyar.). | | Float:col1width | Sütunun birincil genişliği. | | Float:col2width | Sütunun ikincil genişliği. | ## Çalışınca Vereceği Sonuçlar Oluşturulan menünün ID'si veya oluşturulamama durumunda -1. ## Örnekler ```c new Menu:examplemenu; public OnGameModeInit() { examplemenu = CreateMenu("Menu", 2, 200.0, 100.0, 150.0, 150.0); return 1; } ``` ## Notlar :::tip Bu fonksiyon menüyü sadece OLUŞTURUR. - Oyuncuya gösterilmesi için ShowMenuForPlayer kullanılmalıdır. Yalnıza iki sütun oluşturulabilir. (0 ve 1). Başlığın uzunluğu 32 karaktere eşit veya daha fazlaysa başlık 30 karaktere kısaltılır. ::: :::warning There is a limit of 12 items per menu, and a limit of 128 menus in total. ::: ## Bağlantılı Fonksiyonlar - [AddMenuItem](AddMenuItem): Belirtilen menüye öğe ekleme. - [SetMenuColumnHeader](SetMenuColumnHeader): Menüdeki sütunlardan biri için başlığı düzenleme. - [DestroyMenu](DestroyMenu): Menüyü silme. - [ShowMenuForPlayer](ShowMenuForPlayer): Menüyü oyuncu gösterme. - [HideMenuForPlayer](HideMenuForPlayer): Menüyü oyuncu için gizleme. - [OnPlayerSelectedMenuRow](../callbacks/OnPlayerSelectedMenuRow): Fonksiyon, bir oyuncu menü içerisinde bir satır seçtiğinde çağrılır. - [OnPlayerExitedMenu](../callbacks/OnPlayerExitedMenu): Fonksiyon, oyuncu menüden çıkış yaptığında çağrılır.
openmultiplayer/web/docs/translations/tr/scripting/functions/CreateMenu.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/CreateMenu.md", "repo_id": "openmultiplayer", "token_count": 1168 }
510
--- title: "Anahtar Kelimeler: Başlatıcılar" --- ## `const` ```c new const MY_CONSTANT[] = {1, 2, 3}; ``` `const`, geniş çapta kullanılmamakla birlikte, kod tarafından değiştirilemeyen bir değişkeni bildirir. Bu durumun birkaç kullanımı vardır - const dizi parametresine sahip fonksiyonlar bazen daha verimli bir şekilde derlenebilir veya bir dizi olan bir define isteyebilirsiniz. `const`, bir değiştirici olarak kullanılır, new veya başka bir değişken deklaratörü ile birlikte kullanılmalıdır. Bir const değişkeni değiştirmeye çalışırsanız, derleyici uyarı verecektir. ## `enum` Sıralamalar (enum), büyük veri gruplarını ve sabitleri hızlı bir şekilde temsil etmek için çok kullanışlı bir sistemdir. Birkaç ana kullanım alanı vardır - büyük setlerin define ifadeleri ile değiştirilmesi, sembolik olarak dizi yuvalarını temsil etme (aslında aynı şeydir, ancak farklı görünürler) ve yeni etiketler oluşturma. Şu anda en yaygın kullanım, dizi tanımlamaları olarak karşımıza çıkıyor: ```c enum E_MY_ARRAY { E_MY_ARRAY_MONEY, E_MY_ARRAY_GUN } new gPlayerData[MAX_PLAYERS][E_MY_ARRAY]; public OnPlayerConnect(playerid) { gPlayerData[playerid][E_MY_ARRAY_MONEY] = 0; gPlayerData[playerid][E_MY_ARRAY_GUN] = 5; } ``` Bu, her oyuncu için iki yuvaya sahip bir dizi oluşturacaktır. E_MY_ARRAY_MONEY tarafından referans alınan yuvaya bir oyuncu bağlandığında 0'ı ve E_MY_ARRAY_GUN tarafından referans alınan yuvaya 5'i koyacaktır. Enum olmadan bu şöyle görünürdü: ```c new gPlayerData[MAX_PLAYERS][2]; public OnPlayerConnect(playerid) { gPlayerData[playerid][0] = 0; gPlayerData[playerid][1] = 5; } ``` Ve bu, ilkini nasıl derleriz. Bu iyidir, ancak daha az okunabilir - Yuva 0 ne içindir ve Yuva 1 ne içindir? Ve daha az esnek, 0 ve 1 arasına başka bir yuva eklemek isterseniz, tüm 1'leri 2'ye, yeni olanı ekleyip hiçbir şeyi kaçırmadığınızı umarsınız, oysa enum ile sadece şunu yaparsınız: ```c enum E_MY_ARRAY { E_MY_ARRAY_MONEY, E_MY_ARRAY_AMMO, E_MY_ARRAY_GUN } new gPlayerData[MAX_PLAYERS][E_MY_ARRAY]; public OnPlayerConnect(playerid) { gPlayerData[playerid][E_MY_ARRAY_MONEY] = 0; gPlayerData[playerid][E_MY_ARRAY_AMMO] = 100; gPlayerData[playerid][E_MY_ARRAY_GUN] = 5; } ``` Yeniden derleyin ve her şey sizin için güncellenecektir. Peki bir enum nasıl şeylere değer verir? Bir enum'un tam biçimi şu şekildedir: ```c enum NAME (modifier) { NAME_ENTRY_1 = value, NAME_ENTRY_2 = value, ... NAME_ENTRY_N = value } ``` Ancak bunun birçoğu zımnen belirlenir. Varsayılan olarak, bir değiştirici belirtmezseniz, bu (+= 1) olur, bu da demektir ki enum'daki her değer, enum'daki son değer + 1'dir. Örneğin: ```c enum E_EXAMPLE { E_EXAMPLE_0, E_EXAMPLE_1, E_EXAMPLE_2 } ``` İlk değer (E_EXAMPLE_0) 0'dır (varsayılan olarak başka bir değer belirtilmezse), bu nedenle ikinci değer (E_EXAMPLE_1) 1'dir (0 + 1) ve üçüncü değer (E_EXAMPLE_2) 2'dir (1 + 1). Bu, E_EXAMPLE'ın değerinin 3 olduğu anlamına gelir (2 + 1), enum'un adı aynı zamanda enum'daki son değerdir. Eğer değiştiriciyi değiştirirseniz farklı değerler elde edersiniz: ```c enum E_EXAMPLE (+= 5) { E_EXAMPLE_0, E_EXAMPLE_1, E_EXAMPLE_2 } ``` Bu örnekte her değer, önceki değer + 5 olduğu için, tekrar 0'dan başlayarak şu şekildedir: E_EXAMPLE_0 = 0, E_EXAMPLE_1 = 5, E_EXAMPLE_2 = 10, E_EXAMPLE = 15. Eğer bir dizi şu şekilde bildirilirse: ```c new gEnumArray[E_EXAMPLE]; ``` E_EXAMPLE'ın değeri 15 hücreli bir dizi verecektir, ancak enum değerlerini kullanarak sadece hücreleri 0, 5 ve 10'a erişebilirsiniz (ancak normal sayıları hala kullanabilirsiniz). Başka bir örneğe bakalım: ```c enum E_EXAMPLE (*= 2) { E_EXAMPLE_0, E_EXAMPLE_1, E_EXAMPLE_2 } ``` Bu durumda tüm değerler 0'dır. Neden? İlk değer varsayılan olarak 0'dır, sonra 0 _ 2 = 0, sonra 0 _ 2 = 0 ve 0 * 2 = 0. Peki bunu nasıl düzeltebiliriz? İşte bu durumda özel değerler devreye girer: ```c enum E_EXAMPLE (*= 2) { E_EXAMPLE_0 = 1, E_EXAMPLE_1, E_EXAMPLE_2 } ``` Bu, ilk değeri 1 olarak ayarlar, bu nedenle 1, 2, 4 ve 8 alırsınız. Bunu istediğiniz gibi ve istediğiniz kadar değeri ayarlayabilirsiniz: ```c enum E_EXAMPLE (*= 2) { E_EXAMPLE_0, E_EXAMPLE_1 = 1, E_EXAMPLE_2 } ``` Sonuç: ```c 0, 1, 2, 4 ``` İken: ```c enum E_EXAMPLE (*= 2) { E_EXAMPLE_0 = 1, E_EXAMPLE_1 = 1, E_EXAMPLE_2 = 1 } ``` Sonuç: ```c 1, 1, 1, 2 ``` Diziler için += 1 dışında başka bir şey kullanmamanız tavsiye edil ir. Ayrıca enum'larda dizileri kullanabilirsiniz: ```c enum E_EXAMPLE { E_EXAMPLE_0[10], E_EXAMPLE_1, E_EXAMPLE_2 } ``` Bu, E_EXAMPLE_0 = 0, E_EXAMPLE_1 = 10, E_EXAMPLE_2 = 11 ve E_EXAMPLE = 12'yi yapacaktır, popüler inanışın aksine 0, 1, 2 ve 3 değerlerini alamaz. Enum öğeleri etiketlere sahip olabilir, bu yüzden orijinal örneğimiz için: ```c enum E_MY_ARRAY { E_MY_ARRAY_MONEY, E_MY_ARRAY_AMMO, Float:E_MY_ARRAY_HEALTH, E_MY_ARRAY_GUN } new gPlayerData[MAX_PLAYERS][E_MY_ARRAY]; public OnPlayerConnect(playerid) { gPlayerData[playerid][E_MY_ARRAY_MONEY] = 0; gPlayerData[playerid][E_MY_ARRAY_AMMO] = 100; gPlayerData[playerid][E_MY_ARRAY_GUN] = 5; gPlayerData[playerid][E_MY_ARRAY_HEALTH] = 50.0; } ``` Bu, bir etiket uyuşmazlığı vermeyecektir. Enum'lar aynı zamanda etiket olarak kullanılabilir: ```c enum E_MY_TAG (<<= 1) { E_MY_TAG_NONE, E_MY_TAG_VAL_1 = 1, E_MY_TAG_VAL_2, E_MY_TAG_VAL_3, E_MY_TAG_VAL_4 } new E_MY_TAG:gMyTagVar = E_MY_TAG_VAL_2 | E_MY_TAG_VAL_3; ``` Bu, yeni bir değişken oluşturacak ve ona değeri 6 (4 | 2) atayacaktır ve özel bir etikete sahip olacaktır, bu da şu şekilde kullanılabilir: ```c gMyTagVar = 7; ``` Etiket uyuşmazlığı uyarısı üretecektir, ancak etiket üzerine yazma kullanarak bunu atlayabilirsiniz: ```c gMyTagVar = E_MY_TAG:7; ``` Bu, bayrak verileri için (yani, bazı veriler için bir bit) veya hatta birleşik veriler için çok yararlı olabilir: ```c enum E_MY_TAG (<<= 1) { E_MY_TAG_NONE, E_MY_TAG_MASK = 0xFF, E_MY_TAG_VAL_1 = 0x100, E_MY_TAG_VAL_2, E_MY_TAG_VAL_3, E_MY_TAG_VAL_4 } new E_MY_TAG:gMyTagVar = E_MY_TAG_VAL_2 | E_MY_TAG_VAL_3 | (E_MY_TAG:7 & E_MY_TAG_MASK); ``` Bu, 1543 değerini (0x0607) üretecektir. Son olarak, ilk olarak belirtildiği gibi, enum'lar define ifadelerini yerine koymak için kullanılabilir: ```c #define TEAM_NONE 0 #define TEAM_COP 1 #define TEAM_ROBBER 2 #define TEAM_CIV 3 #define TEAM_CLERK 4 #define TEAM_DRIVER 5 ``` Bunun gibi bir sürü şeyi takımları tanımlamak için görmüşsünüzdür. Hepsi güzel ve iyi ama çok statiktir. Bu, sayısal atamaları otomatik olarak yönetmek için bir enum tarafından kolayca değiştirilebilir: ```c enum { TEAM_NONE, TEAM_COP, TEAM_ROBBER, TEAM_CIV, TEAM_CLERK, TEAM_DRIVER } ``` Bunlar hepsi aynı değerlere sahiptir ve tamamen aynı şekilde kullanılabilir: ```c new gPlayerTeam[MAX_PLAYERS] = {TEAM_NONE, ...}; public OnPlayerConnect(playerid) { gPlayerTeam[playerid] = TEAM_NONE; } public OnPlayerRequestSpawn(playerid) { if (gPlayerSkin[playerid] == gCopSkin) { gPlayerTeam[playerid] = TEAM_COP; } } ``` Bu konuda olduğumuzda, bu yönteme dayalı olarak takımları daha iyi tanımlamanın daha iyi bir yolu vardır: ```c enum (<<= 1) { TEAM_NONE, TEAM_COP = 1, TEAM_ROBBER, TEAM_CIV, TEAM_CLERK, TEAM_DRIVER } ``` Şimdi TEAM_COP 1, TEAM_ROBBER 2, TEAM_CIV 4, vb. Bu, ikili olarak 0b00000001, 0b00000010 ve 0b00000100'te olduğu için bir oyuncunun takımının 3 olması durumunda, hem polis takımında hem de soyguncu takımında oldukları anlamına gelir. Bu belki anlamsız gibi görünebilir ancak bazı olasılıkları açar: ```c enum (<<= 1) { TEAM_NONE, TEAM_COP = 1, TEAM_ROBBER, TEAM_CIV, TEAM_CLERK, TEAM_DRIVER, TEAM_ADMIN } ``` Bunu kullanarak, sadece tek bir değişken kullanarak hem normal bir takımda hem de yönetici takımında olabilirsiniz. Elbette biraz kod değişikliği gereklidir ancak bu kolaydır: Bir oyuncuyu bir takıma eklemek için: ```c gPlayerTeam[playerid] |= TEAM_COP; ``` Bir oyuncuyu bir takımdan çıkarmak için: ```c gPlayerTeam[playerid] &= ~TEAM_COP; ``` Bir oyuncunun bir takımda olup olmadığını kontrol etmek için: ```c if (gPlayerTeam[playerid] & TEAM_COP) ``` Çok basit ve çok kullanışlı. ## `forward` `forward`, derleyiciye bir işlevin daha sonra geleceğini bildirir. Tüm genel işlevler için zorunlu olup diğer yerlerde de kullanılabilir. Kullanımı şu şekildedir: "forward" ifadesinden sonra işlevin tam adı ve parametreleri, ardından noktalı virgül: ```c forward MyPublicFunction(playerid, const string[]); public MyPublicFunction(playerid, const string[]) { } ``` Tüm genel işlevler için zorunlu olmanın yanı sıra, forward, bir işlevin daha sonra bildirilmeden önce kullanılması durumunda ortaya çıkan nadir bir uyarıyı düzeltmek için de kullanılabilir. ```c main() { new Float:myVar = MyFloatFunction(); } Float:MyFloatFunction() { return 5.0; } ``` Bu, derleyicinin işlemin nasıl bir sayıya veya ondalık sayıya dönüştürüleceğini bilmediği için bir yeniden ayrıştırma uyarısı verecektir. Bu örnekte açıkça bir ondalık sayı döndürdüğü görülmektedir. Bu, işlevin kullanıldığı kodun önünde bir noktaya yerleştirilerek veya işlemin ne türde bir değer döndürdüğünü bilmesi için işlemin öne bildirilmesiyle çözülebilir: ```c Float:MyFloatFunction() { return 5.0; } main() { new Float:myVar = MyFloatFunction(); } ``` veya derleyicinin ne yapması gerektiğini bildiği bir işlevi öne bildirerek: ```c forward Float:MyFloatFunction(); main() { new Float:myVar = MyFloatFunction(); } Float:MyFloatFunction() { return 5.0; } ``` Not: `forward`, geri dönüş etiketini de içerir. ## `native` Bir doğal işlev, sanal makinede (yani, betikleri çalıştıran şeyde) tanımlanan bir işlevidir, doğrudan betikte değil. SA:MP veya bir eklentiye kodlanmışsa yalnızca doğal işlevleri tanımlayabilirsiniz, ancak sahte doğal işlevler oluşturabilirsiniz. .inc dosyalarındaki doğal işlevler pawno tarafından algılandığından ve pawno'nun sağ tarafındaki listede göründüğünden, kendi özel işlevlerinizi orada listelenmiş olarak görmek faydalı olabilir. Normal bir doğal deklarasyon şu şekilde görünebilir: ```c native printf(const format[], {Float,_}:...); ``` Eğer kendi işlevlerinizin doğal olarak listelenmesini istiyorsanız, şu şekilde bir şey yapabilirsiniz: ```c /* native MyFunction(playerid); */ ``` PAWNO bu tür yorumları tanımaz, bu nedenle bu işlevi listede ekler, ancak derleyici bu tür yorumları tanır, bu nedenle deklarasyonu görmezden gelir. `native` ile yapabileceğiniz başka ilginç bir şey de işlevleri yeniden adlandırma/aşırı yüklemedir: ```c native my_print(const string[]) = print; ``` Şimdi, print işlevi aslında mevcut değildir. SA:MP'de hala bulunur ve derleyici, gerçek adını "= print" kısmından bildiği için bu işlevi orada tanır, ancak PAWN'da çağrırsanız bir hata alırsınız çünkü print'i my_print adına içsel olarak yeniden adlandırdınız. Artık print işlevi mevcut olmadığı için onu normal bir işlev gibi tanımlayabilirsiniz: ```c print(const string[]) { my_print("Someone called print()"); my_print(string); } ``` Artık bir komut çağrıldığında önce başka bir iletişim kutusu görüntülenir ve ardından orijinal iletişim kutusu görüntülenir. ## `new` Bu, değişkenlerin çekirdeği, en önemli kelimelerden biridir. `new`, yeni bir değişkeni bildirir: ```c new myVar = 5; ``` Bu, bir değişken oluşturacak, adını `myVar` olarak belirleyecek ve ona 5 değerini atayacaktır. Varsayılan olarak, hiçbir şey belirtilmemişse tüm değişkenler 0'dır: ```c new myVar; printf("%d", myVar); ``` Bu "0" sonucunu verir. Bir değişkenin kapsamı, nerede kullanılabileceğini belirtir. Kapsam, ayraçlar (yani süslü parantezler - {} ) tarafından sınırlanır; bir dizi ayraç içinde bildirilen herhangi bir değişken, yalnızca bu ayraçlar içinde kullanılabilir. ```c if (a == 1) { // Ayraçlar, bu satırın üstünden başlar new myVar = 5; // Bu printf de aynı ayraçların içinde olduğundan myVar'ı kullanabilir. printf("%d", myVar); // Bu if ifadesi de ayraçlar içinde olduğundan myVar'ı ve içindeki her şeyi kullanabilir if (myVar == 1) { printf("%d", myVar); } // Ayraçlar, bu satırın altında biter } // Bu, ayraçların dışında olduğu için bir hata verecek printf("%d", myVar); ``` Yukarıdaki örnek, doğru girintinin neden bu kadar önemli olduğunu da göstermektedir. Eğer global bir değişken (yani, bir işlevin dışında bildirilen) yeni olarak bildirilirse, bildirimden sonra her yerde kullanılabilir: File1.pwn: ```c MyFunc1() { // Hata, gMyVar henüz mevcut değil printf("%d", gMyVar); } // gMyVar burada bildirilir new gMyVar = 10; MuFunc2() { // Şimdi gMyVar mevcut olduğu için sorun yok printf("%d", gMyVar); } // Başka bir dosyayı buraya dahil et #include "file2.pwn" ``` file2.pwn: ```c MyFunc3() { // Bu da sorun değil, bu dosya, bildirimden sonra ilk dosyada dahil edildi ve yeni dosyalar için sınırlama yok printf("%d", gMyVar); } ``` ## `operator` Bu, özel etiketler için operatörleri aşırı yüklemenizi sağlar. Örneğin: ```c stock BigEndian:operator=(b) { return BigEndian:(((b >>> 24) & 0x000000FF) | ((b >>> 8) & 0x0000FF00) | ((b << 8) & 0x00FF0000) | ((b << 24) & 0xFF000000)); } main() { new BigEndian:a = 7; printf("%d", _:a); } ``` Normal pawn sayıları, küçük uçlu olarak adlandırılan bir formatta depolanır. Bu operatör, normal bir sayıyı büyük uçlu bir sayıya dönüştürmek için atanmayı tanımlamanıza olanak tanır. Büyük uçlu ve küçük uçlu arasındaki fark, bayt sırasıdır. Küçük uçlu bir 7, şu şekilde depolanır: ```c 07 00 00 00 ``` Büyük uçlu bir 7, şu şekilde depolanır: ```c 00 00 00 07 ``` Bu nedenle, büyük uçlu olarak depolanan bir sayının içeriğini yazdırırsanız, bunu küçük uçlu bir sayı olarak okumaya çalışacak ve tersine çevirecektir, böylece 0x07000000, yani 117440512'yi alırsınız, ki bu da bu kodu çalıştırırsanız elde edeceğiniz sonuçtur. Aşağıdaki operatörleri aşırı yükleyebilirsiniz: ```c +, -, *, /, %, ++, --, ==, !=, <, >, <=, >=, ! ve = ``` Ayrıca, onları istediğiniz gibi çalıştırabilirsiniz: ```c stock BigEndian:operator+(BigEndian:a, BigEndian:b) { return BigEndian:42; } main() { new BigEndian:a = 7, BigEndian:b = 199; printf("%d", _:(a + b)); } ``` Yalnızca 42 elde edersiniz, toplamadan hiçbir şey değil. ## `public` `public` kelimesi, bir fonksiyonun San Andreas: Multiplayer (SA:MP) sunucu tarafından doğrudan çağrılmasını sağlamak için kullanılır. Yani, fonksiyonun sadece PAWN betiğinin içinden değil, aynı zamanda San Andreas: Multiplayer sunucusu tarafından çağrılmasına izin verir. Aynı prensiple, değişkenleri de sunucudan okuma ve yazma yeteneği için genel hale getirebilirsiniz; ancak bu, genellikle SA:MP'de kullanılmaz (bir eklentiden bunu kullanabilirsiniz, ancak ben denemedim) (const ile birleştirerek bir değişkeni yalnızca sunucudan değiştirilemez hale getirebilirsiniz). Bir `public` fonksiyonun amx dosyasında metinsel adının saklandığı unutulmamalıdır. Bu, normal fonksiyonların yalnızca atlama için adreslerinin saklandığı şekilden farklıdır ve dekompilasyonun başka bir dezavantajıdır. Bu, fonksiyonu adıyla dış betikten çağırmanıza izin verir; aynı zamanda adını bırakarak ve tekrar girerek betiğin içinden fonksiyonları adlarıyla çağırmanıza da izin verir. Bir native fonksiyon çağrısı, neredeyse bir public fonksiyon çağrısının tersidir; dış betikten iç betikteki bir fonksiyonu değil, iç betikten dış betikteki bir fonksiyonu çağırır. İkisini birleştirirseniz, SetTimer, SetTimerEx, CallRemoteFunction ve CallLocalFunction gibi fonksiyonlar elde edersiniz; bunlar adlarıyla değil, adresleriyle fonksiyonları çağırır. Adıyla bir fonksiyon çağırma örneği: ```c forward MyPublicFunc(); main() { CallLocalFunction("MyPublicFunc", ""); } public MyPublicFunc() { printf("Merhaba"); } ``` `public` fonksiyonlar ya "public" ya da "@" ile öneklenmiştir ve forward bölümünde belirtildiği gibi tümü yönlendirme gerektirir: ```c forward MyPublicFunc(); forward @MyOtherPublicFunc(var); main() { CallLocalFunction("MyPublicFunc", ""); SetTimerEx("@MyOtherPublicFunc", 5000, 0, "i", 7); } public MyPublicFunc() { printf("Merhaba"); } @MyOtherPublicFunc(var) { printf("%d", var); } ``` Bu örnek açıkça SetTimerEx'i kullanarak "MyOtherPublicFunc" fonksiyonunu 5 saniye sonra çağırma ve ona 7 tamsayı değerini ileterek tanıtır. Çoğu örnekte kullanılan `main` fonksiyonu, dış betikten çağrılabilen bir public fonksiyona benzer bir şekilde davranır, ancak bu bir public fonksiyon değildir - sadece özel bir bilinen adı vardır, böylece sunucu çalıştırmak için nereye atlaması gerektiğini bilir. Tüm SA:MP geriçağırımları otomatik olarak dış betikten çağrılır ve genelde şu şekildedir: ```c public OnPlayerConnect(playerid) { printf("%d bağlandı", playerid); } ``` Birisi sunucuya katıldığında, sunucu otomatik olarak bu genel fonksiyonu tüm betiklerde (ilk olarak oyun modu, ardından filtre betikleri) arar ve bulursa çağırır. Ancak betiğin içinden bir genel fonksiyonu çağırmak istiyorsanız, bunu adıyla çağırmanız gerekmez; genel fonksiyonlar aynı zamanda normal fonksiyonlar gibi davranır: ```c forward MyPublicFunc(); main() { MyPublicFunc(); } public MyPublicFunc() { printf("Merhaba"); } ``` Bu, CallLocalFunction veya başka bir native kullanmaktan çok daha hızlıdır. ## `static` `static` kelimesi, genelde `new` değişkeni gibi genel bir değişkenin daha sınırlı bir kapsama sahip olması anlamına gelir. Global olarak kullanıldığında, oluşturulan değişkenler yalnızca oluşturuldukları bölgeye (bkz. #section) sınırlıdır. Bu nedenle, önceki "new" örneğini ele alalım: **file1.pwn** ```c MyFunc1() { // Hata, gMyVar henüz mevcut değil printf("%d", gMyVar); } // gMyVar burada bildirilir new gMyVar = 10; MuFunc2() { // Sorun yok, gMyVar şimdi mevcut printf("%d", gMyVar); } // Başka bir dosyayı buraya dahil et #include "file2.pwn" ``` file2.pwn ```c MyFunc3() { // Sorun yok, bu dosya ilk dosyadan sonra dahil edildi ve new, dosya kısıtlamalı değildir printf("%d", gMyVar); } ``` Ve bunu `static` ile değiştirirsek: file1.pwn ```c MyFunc1() { // Hata, g_sMyVar henüz mevcut değil printf("%d", g_sMyVar); } // g_sMyVar burada bildirilir static g_sMyVar = 10; MuFunc2() { // Sorun yok, g_sMyVar şimdi mevcut printf("%d", g_sMyVar); } // Başka bir dosyayı buraya dahil et #include "file2.pwn" ``` file2.pwn ```c MyFunc3() { // Hata, g_sMyVar sadece bildirildiği dosya (veya bölge) ile sınırlıdır , bu farklı bir dosya printf("%d", g_sMyVar); } ``` Bu, aynı adı taşıyan iki global değişkeninizin farklı dosyalarda olmasına izin verir. `static`i yerel olarak (yani bir fonksiyonda) kullanırsanız, değişkenin, yeni ile oluşturulan yerel değişkenler gibi, yalnızca bildirildiği kapsam içinde kullanılabilir. Ancak `new` değişkenlerinin aksine, `static` değişkenler çağrılar arasında değerlerini kaybetmez. ```c main() { for (new loopVar = 0; loopVar < 4; loopVar++) { MyFunc(); } } MyFunc() { new i = 0; printf("%d", i); i++; printf("%d", i); } ``` Her seferinde fonksiyon çağrıldığında i sıfırlanır, bu nedenle sonuçta çıktı şu olacaktır: ```c 0 1 0 1 0 1 0 1 ``` Eğer "new" ifadesini "static" ile değiştirirsek: ```c main() { for (new loopVar = 0; loopVar < 4; loopVar++) { MyFunc(); } } MyFunc() { static i = 0; printf("%d", i); i++; printf("%d", i); } ``` Ve çünkü `static` yerel değişkenler çağrılar arasında değerlerini korudukları için, sonuçta çıktı şu olacaktır: ```c 0 1 1 2 2 3 3 4 ``` Bildiride verilen değer (bir değer verilmişse, `new` değişkenleri gibi, `static` değişkenleri varsayılan olarak 0'dır) değişkenin ilk kez çağrıldığı zaman değişkene atanır. Bu nedenle, "static i = 5;" ifadesini kullanırsak, sonuç şu olacaktır: ```c 5 6 6 7 7 8 8 9 ``` `static` değişkenlerin depolandığı şekilden dolayı, aslında global değişkenlerdir; ancak derleyici, değişkenin doğru yerde kullanılıp kullanılmadığını kontrol eder. Sonuç olarak, dekompilasyon betikleri normal global değişkenler, global `static`'ler ve yerel `static`'ler arasında ayırt edemez ve hepsini normal global değişkenler olarak gösterir. `static` fonksiyonlara da sahip olabilirsiniz, bu fonksiyonlar yalnızca bildirildikleri dosyadan çağrılabilir. Bu, özel tarz fonksiyonlar için kullanışlıdır. ## `stock` `stock` kelimesi, kullanılmayan uyarılar oluşturmak istemediğiniz değişkenleri ve fonksiyonları bildirmek için kullanılır. Değişkenlerle ilgili olarak, `stock`, bir `const` gibi bir değiştirici olup, tam bir bildirim değildir. Bu nedenle şöyle bir kullanım olabilir: ```c new stock gMayBeUsedVar; static stock g_sMayBeUsedVar; ``` Değişken veya fonksiyon kullanılıyorsa derleyici onu dahil eder, kullanılmıyorsa dışarıda bırakır. Bu, `#pragma unused (symbol)` kullanmaktan farklıdır, çünkü bu sadece uyarıyı bastırır (yani gizler) ve bilgiyi yine de içerir; ancak `stock`, kullanılmayan veriyi tamamen yoksayar. `stock` genellikle özel kütüphaneler için kullanılır. Eğer bir kütüphane yazıyorsanız, başkalarının kullanması için bir dizi fonksiyon sağlarsınız ancak bunların kullanılıp kullanılmayacağını bilmezsiniz. Kodunuz bir kişinin kullanmadığı her fonksiyon için çok sayıda uyarı verirse, insanlar şikayet eder (bu bir değişkeni başlatmak için kullanılması zorunlu olmadıkça). Ancak YSI ile kişisel deneyime dayanarak, insanlar yine de şikayet eder. ```c main() { Func1(); } Func1() { printf("Merhaba"); } Func2() { printf("Selam"); } ``` Burada `Func2` hiç çağrılmazsa derleyici bir uyarı verecek. Bu, normal bir betikte genellikle kullanılmayan bir fonksiyonu unuttuğunuz anlamına gelebilir, ancak `Func1` ve `Func2` bir kütüphanede ise kullanıcı belki de `Func2`'ye ihtiyaç duymaz, bu yüzden şu şekilde yaparsınız: ```c main() { Func1(); } stock Func1() { printf("Merhaba"); } stock Func2() { printf("Selam"); } ``` Ve fonksiyon derlenmeyecek ve uyarı kaldırılacaktır.
openmultiplayer/web/docs/translations/tr/scripting/language/Initialisers.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Initialisers.md", "repo_id": "openmultiplayer", "token_count": 11499 }
511
--- title: "Uzak Konsol (RCON)" description: Uzak sunucu yönetimi. --- Uzak Konsol, oyun içinde olmadan ve sunucunuzda RCON komutlarını kullanabileceğiniz bir komut istemidir. 0.3b sürümünden itibaren Uzak Konsol, Sunucu Tarayıcısı'ndan kaldırıldı. Bundan sonra, aşağıda açıklandığı gibi Uzak RCON'a erişmek için başka bir yol kullanmanız gerekecek. 1. Bir metin düzenleyicisi açın. 2. Aşağıdaki satırı yazın: `rcon.exe IP PORT RCON-PASS` (IP/PORT/PASS'ı sunucu bilgilerinizle değiştirin) 3. Dosyayı `rcon.bat` olarak kaydedin. 4. Dosyayı `rcon.exe` dosyasının bulunduğu sunucu dizinine koyun. 5. `rcon.bat` dosyasını çalıştırın. 6. İstediğiniz komutu girin. ![Rcon konsolu](/images/server/rcon.jpg) Not: Sunucu tarayıcısında komuttan önce `/rcon` yazmanıza gerek yoktur ve komutlar, bunu yaparsanız çalışmaz. Örneğin, sunucuyu sıfırlamak istiyorsanız sadece `gmx` yazın ve enter tuşuna basın. Bu yapmanız gereken tek şeydir. İyi oyunlar.
openmultiplayer/web/docs/translations/tr/server/RemoteConsole.md/0
{ "file_path": "openmultiplayer/web/docs/translations/tr/server/RemoteConsole.md", "repo_id": "openmultiplayer", "token_count": 496 }
512
--- title: OnFilterScriptExit description: 这个回调函数在卸载某个过滤脚本时调用。只有将被卸载的那个过滤脚本才会调用。 tags: [] --- ## 描述 这个回调函数在卸载某个过滤脚本时调用。只有将被卸载的那个过滤脚本才会调用。 ## 案例 ```c public OnFilterScriptExit() { print("\n--------------------------------------"); print("我的过滤脚本卸载了。"); print("--------------------------------------\n"); return 1; } ``` ## 相关回调
openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnFilterScriptExit.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnFilterScriptExit.md", "repo_id": "openmultiplayer", "token_count": 291 }
513
--- title: OnPlayerClickTextDraw description: 当玩家点击文本绘制或用Escape键取消选择模式时,这个回调函数被调用。 tags: ["player", "textdraw"] --- ## 描述 当玩家点击文本绘制或用 Escape 键取消选择模式时,这个回调函数被调用。 | 参数名 | 描述 | | --------- | ------------------------------------------------------------------- | | playerid | 点击文本绘制的玩家的 ID。 | | clickedid | 被点击的文本绘制的 ID。如果选择模式被取消,则为 INVALID_TEXT_DRAW。 | ## 返回值 它在过滤脚本中总是先被调用,所以返回 1 会阻止其他脚本看到它。 ## 案例 ```c new Text:gTextDraw; public OnGameModeInit() { gTextDraw = TextDrawCreate(10.000000, 141.000000, "我的文本绘制"); TextDrawTextSize(gTextDraw,60.000000, 20.000000); TextDrawAlignment(gTextDraw,0); TextDrawBackgroundColor(gTextDraw,0x000000ff); TextDrawFont(gTextDraw,1); TextDrawLetterSize(gTextDraw,0.250000, 1.000000); TextDrawColor(gTextDraw,0xffffffff); TextDrawSetProportional(gTextDraw,1); TextDrawSetShadow(gTextDraw,1); TextDrawSetSelectable(gTextDraw, 1); return 1; } public OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys) { if (newkeys == KEY_SUBMISSION) { TextDrawShowForPlayer(playerid, gTextDraw); SelectTextDraw(playerid, 0xFF4040AA); } return 1; } public OnPlayerClickTextDraw(playerid, Text:clickedid) { if (clickedid == gTextDraw) { SendClientMessage(playerid, 0xFFFFFFAA, "你点击了一个文本绘制"); CancelSelectTextDraw(playerid); return 1; } return 0; } ``` ## 要点 :::warning TextDrawTextSize 定义了可点击区域。向函数传递的 x 轴和 y 轴参数不能为零或负值。不能无条件地在此回调函数中使用 CancelSelectTextDraw,这将导致无限循环。 ::: ## 相关回调 - [OnPlayerClickPlayerTextDraw](OnPlayerClickPlayerTextDraw): 当玩家点击玩家文本绘制时调用。 - [OnPlayerClickPlayer](OnPlayerClickPlayer): 当一个玩家点击另一个玩家时调用。
openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerClickTextDraw.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerClickTextDraw.md", "repo_id": "openmultiplayer", "token_count": 1197 }
514
--- title: OnPlayerKeyStateChange description: 当任何受支持的按键的状态发生变化(按下/松开)时,将调用此回调。 tags: ["player"] --- ## 描述 当任何受支持的[按键](../resources/keys)的状态发生变化(按下/松开)时,将调用此回调。 方向键不触发 OnPlayerKeyStateChange(上/下/左/右)。 | 参数名 | 描述 | | -------- | -------------------------------------------------------- | | playerid | 按下或松开键的玩家的 ID。 | | newkeys | 当前支持的键映射(位掩码) - [参考这里](../resources/keys) | | oldkeys | 当前支持的键映射(位掩码) - [参考这里](../resources/keys) | ## 返回值 - 此回调不处理返回。 - 它在游戏模式中总是先被调用。 ## 要点 <TipNPCCallbacksCN /> :::tip 方向键不会触发 OnPlayerKeyStateChange(上/下/左/右)。 它们只能通过 [GetPlayerKeys 函数](../functions/GetPlayerKeys) (在 [OnPlayerUpdate 回调](../callbacks/OnPlayerUpdate) 或计时器中被捕获)。 ::: ## 相关函数 - [GetPlayerKeys](../functions/GetPlayerKeys): 检查玩家正在按的是什么键。 ## 附加信息 ### 介绍 每当玩家按下或松开受支持的某个键 (见[按键](../resources/keys)), 支持的键不是实际的键盘按键,而是圣安地列斯映射的功能键。 这意味着,您无法检测到玩家何时按下了什么键,例如**空格键**,但可以检测到他们何时按下了冲刺键(Sprint) (玩家可以分配该映射给空格键,也可以分配给其他按键(默认情况下冲刺键是 Sprint 键)。 ### 参数 此函数的参数是当前按下的所有键和刚才按下的所有键的列表。 当键状态更改时(即,当按下或松开键时)调用回调,并传递此更改前后的状态或所有键。 这些信息可以用来查看到底发生了什么,但变量不能像其他函数的参数一样直接使用。 为了减少变量的数量,只使用一个位来表示一个键,**这意味着一个变量可能同时包含多个键,简单地比较值并不总是有效的**。 ### 如何不去检测某个键 假设你想检测玩家何时按下开火按钮,显而易见的代码应该是: ```c if (newkeys == KEY_FIRE) ``` 这段代码甚至可能在你的测试中工作,但是它是错误的,你的测试是不充分的。尝试蹲下并按下开火键,您的代码将立即停止工作。 为什么?因为 "newkeys" 不再等同于“KEY_FIRE”,而是等同于“KEY_FIRE”结合“KEY_CROUCH”。 ### 如何检测某个键 那么,如果变量可以同时包含多个键,那么如何检查是否只有一个键呢? 答案是位屏蔽。 每个键在变量中都有自己的位(有些键有相同的位,但它们在步行/车内对应不同功能,因此无论如何都不能同时按下),您只需检查这一点: ```c if (newkeys & KEY_FIRE) ``` 请注意,单个&是正确的,这是按位与运算,而不是两个&的逻辑与运算。 现在,如果你测试这个代码,当你按下开火键时,无论你是蹲着还是站着,它都会起作用。 然而,还有一个小问题——只要你按住开火键,它就会一直开火。 每次键更改时都会调用 OnPlayerKeyStateChange,只要按住开火键,这个代码是正确的。 如果你按下开火键,代码将被触发,如果按住那个键并按下蹲下,代码将再次触发。 因为一个键(下蹲)已经改变,并且仍然被按下,你如何检测到一个键第一次被按下,但当它仍然被按住而另一个键改变时不会再次触发? ### 如何检测已按下的键 这就是“oldkeys”的用武之地。 要检查某个键是否刚刚被按下,你需要首先检查它是否设置在“newkeys”中--意思是它被按住了,然后检查它是否不在“oldkeys”中--意思是它只是被按住了。 下面的代码执行此操作: ```c if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)) ``` 只有当第一次按下开火键时才会发生这种情况,而不是在按住它并改变另一个键的时候。 ### 如何检查正在松开的键 与上面的原则完全相同,但情况相反: ```c if ((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE)) ``` ### 如何检查多个键 如果您想要检查保持蹲伏射击的玩家,则以下代码可以很好地工作: ```c if ((newkeys & KEY_FIRE) && (newkeys & KEY_CROUCH)) ``` 但是,如果您想要检测他们第一次按下火和蹲下的时间,下面的代码将不起作用。 如果他们设法同时按下这两个键,它就会起作用,但如果他们零星地(远远不到半秒)按下这两个键,就不会: ```c if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH)) ``` 为什么不行?因为每次更改单个按键时都会调用 OnPlayerKeyStateChange。 所以他们按“KEY_FIRE”-OnPlayerKeyStateChange 是用“newkeys”中的“KEY_FIRE”调用的,而不是在“oldkeys”中调用的。 然后他们按下“KEY_CROUCH”-OnPlayerKeyStateChange 是用“KEY_CROUCH”调用的,在“newkeys”中调用的是“KEY_FIRE”,但“KEY_FIRE”,现在也在“oldkeys”中,因为它已经被按下了。 所以“!(oldkeys & KEY_FIRE)”将失败。 幸运的是,解决方案非常简单(实际上比原始代码更简单): ```c if ((newkeys & (KEY_FIRE | KEY_CROUCH)) == (KEY_FIRE | KEY_CROUCH) && (oldkeys & (KEY_FIRE | KEY_CROUCH)) != (KEY_FIRE | KEY_CROUCH)) ``` 这看起来可能很复杂,但它会检查两个键是否都设置在“newkey”中,以及两个键是否都没有设置在“oldkey”中,如果其中一个设置在“oldkey”中,这并不重要,因为它们都不是。 **有了 #define 定义,所有这些事情都可以大大简化。** ## 简化 ### 检测是否按住某键 定义: ```c // HOLDING(keys) #define HOLDING(%0) \ ((newkeys & (%0)) == (%0)) ``` 按住一个键: ```c if (HOLDING( KEY_FIRE )) ``` 按住多个键: ```c if (HOLDING( KEY_FIRE | KEY_CROUCH )) ``` ### 检测第一次按下一个键 定义: ```c // PRESSED(keys) #define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) ``` 按下一个键: ```c if (PRESSED( KEY_FIRE )) ``` 按下多个键: ```c if (PRESSED( KEY_FIRE | KEY_CROUCH )) ``` ### 检测玩家当前是否按下某个键 定义: ```c // PRESSING(keyVariable, keys) #define PRESSING(%0,%1) \ (%0 & (%1)) ``` 当前按下一个键: ```c if (PRESSING( newkeys, KEY_FIRE )) ``` 当前按下多个键: ```c if (PRESSING( newkeys, KEY_FIRE | KEY_CROUCH )) ``` ### 检测松开键 定义: ```c // RELEASED(keys) #define RELEASED(%0) \ (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0))) ``` 松开一个键: ```c if (RELEASED( KEY_FIRE )) ``` 松开多个键: ```c if (RELEASED( KEY_FIRE | KEY_CROUCH )) ``` ## 案例 ### 当玩家按下开火键时附加氮气 ```c public OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys) { if (PRESSED(KEY_FIRE)) { if (IsPlayerInAnyVehicle(playerid)) { AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); } } return 1; } ``` ### 超级跳 ```c public OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys) { if (PRESSED(KEY_JUMP)) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 10.0); } return 1; } ``` ### 按住不放时进入上帝模式 ```c new Float:gPlayerHealth[MAX_PLAYERS]; #if !defined INFINITY #define INFINITY (Float:0x7F800000) #endif public OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys) { if (PRESSED(KEY_ACTION)) { // 按下行动键,保存原有的生命值。 GetPlayerHealth(playerid, gPlayerHealth[playerid]); // 赋予无限生命值 SetPlayerHealth(playerid, INFINITY); } else if (RELEASED(KEY_ACTION)) { // 松开了行动键,恢复之前的生命值 SetPlayerHealth(playerid, gPlayerHealth[playerid]); } return 1; } ``` ### 解释 其实你不需要关心它具体是怎么实现的,尽管用就是了。 按住:检测他们是否正在按下一个键(或多个键),无论他们以前是否按过键。 按下:检测他们是否只按下(S)键,然后松开检测他们是否刚刚松开(S)键。 不过,如果你想知道的更多的话,请继续往下阅读吧。 之所以需要这样做,而不仅仅是使用&或==,是为了准确检测您想要的键,同时忽略其他可能被按下或可能不被按下的键。 在二进制中, KEY_SPRINT 是: ``` 0b00001000 ``` 而 KEY_JUMP 是: ``` 0b00100000 ``` 从而将它们与所需的键进行**或**运算(我们也可以在这个例子中添加它们,但情况并不总是这样) 得到: ``` 0b00101000 ``` 如果我们只使用&,OnPlayerKeyStateChange 在玩家按下跳跃时被调用,我们将得到以下代码: ``` newkeys = 0b00100000 wanted = 0b00101000 ANDed = 0b00100000 ``` 两个数的与运算不为 0,因此检测的结果为真,这不是我们想要的。 如果我们只使用 == 运算符,那么这两个数字显然不相同,因此检测将失败,但这是我们想要的。 如果玩家按下 JUMP、SPRINT 和 CLOUCH,我们将得到以下代码: ``` newkeys = 0b00101010 wanted = 0b00101000 ANDed = 0b00101000 ``` 这两个数与运算的结果和所需的按键相同,也不是 0,因此将给出正确的答案,但是两个原始数字不同,因此==将失败。 在这两个例子中,其中一个给出了正确的答案,另一个给出了错误的答案。 如果我们使用&和==比较第一个,我们得到: ``` newkeys = 0b00100000 wanted = 0b00101000 ANDed = 0b00100000 ``` 显然 想要的 和 与运算的结果 不同,所以检查失败,这是正确的。 对于第二个示例: ``` newkeys = 0b00101010 wanted = 0b00101000 ANDed = 0b00101000 ``` 想要的 和 与运算的结果是相同的,因此将它们比较将得到一个相等的结果,这也是正确的。 因此,使用这种方法,我们可以准确地检查某些键是否被按下,忽略所有其他可能没有按下的键。 oldkeys 检查只使用!=,而不是==来确保之前没有按下所需的键,因此我们知道刚刚按了其中一个键。
openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerKeyStateChange.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerKeyStateChange.md", "repo_id": "openmultiplayer", "token_count": 6568 }
515
--- title: OnPlayerUpdate description: 每次客户端/玩家向服务器更新它们的状态时,都会调用这个回调函数。 tags: ["player"] --- ## 描述 每次客户端/玩家向服务器更新它们的状态时,都会调用这个回调函数。 它经常被用于创建客户端更新的自定义回调,这些更新不被服务器主动跟踪,比如生命值或护甲的更新或玩家切换武器。 | 参数名 | 描述 | | -------- | ------------------------- | | playerid | 发送更新报文的玩家的 ID。 | ## 返回值 0 - 来自此玩家的更新不会复制到其他客户端。 1 - 表示此更新可以正常处理并发送给其他玩家。 它在过滤脚本中总是先被调用。 ## 要点 <TipNPCCallbacksCN /> :::warning 这个回调函数平均每秒被每个玩家调用 30 次; 只有在你知道它的意义(或更重要的是它的不意义)时才使用它。 每个玩家调用此回调的频率随玩家的行为而变化。 驾驶或射击比空闲不动时会触发更多的更新。 ::: ## 案例 案例 - 创建一个自定义回调`OnPlayerChangeWeapon(playerid, oldweapon, newweapon)` ```c public OnPlayerUpdate(playerid) { new iCurWeap = GetPlayerWeapon(playerid); // 返回玩家当前的武器 if (iCurWeap != GetPVarInt(playerid, "iCurrentWeapon")) // 如果自上次更新后他换过武器 { // 让我们调用一个名为OnPlayerChangeWeapon的回调函数 OnPlayerChangeWeapon(playerid, GetPVarInt(playerid, "iCurrentWeapon"), iCurWeap); SetPVarInt(playerid, "iCurrentWeapon", iCurWeap);//更新武器变量 } return 1; // 将此更新发送给其他玩家。 } stock OnPlayerChangeWeapon(playerid, oldweapon, newweapon) { new s[128], oWeapon[24], nWeapon[24]; GetWeaponName(oldweapon, oWeapon, sizeof(oWeapon)); GetWeaponName(newweapon, nWeapon, sizeof(nWeapon)); format(s, sizeof(s), "你把武器从 % s改为 %s !", oWeapon, nWeapon); SendClientMessage(playerid, 0xFFFFFFFF, s); } ``` 上面的例子告诉你如何轻松地创建一个自定义回调函数,该案例展示了`OnPlayerChangeWeapon`回调,并使用了`(playerid, old/new weapon)`参数。 你也可以做很多其他的事情!(注意,在这个案例中,你可能想让玩家连接时(`OnPlayerConnect`),重置`iCurrentWeapon`变量,记得转发`(forward) OnPlayerChangeWeapon`!)。 ## 案例 案例 - 跟踪玩家的生命值变化 ```c public OnPlayerUpdate(playerid) { new Float:fHealth; GetPlayerHealth(playerid, fHealth); if (fHealth != GetPVarFloat(playerid, "faPlayerHealth")) { // 自从上次更新后,玩家的生命值已经改变了——>服务器,所以很明显这就是刚刚更新的东西。 // 让我们进一步检查他的生命值是减少还是获得了,可以借此开发反锁血外挂?;) if (fHealth > GetPVarFloat(playerid, "faPlayerHealth")) { /* 他恢复了生命值!作弊了?在此编写你自己的脚本,以了解玩家是如何 获得生命值的! */ } else { /* 他生命值减少了! */ } SetPVarFloat(playerid, "faPlayerHealth", fHealth); } } ``` 这是另一个简洁的脚本,可能对反生命值作弊有好处?或许很有帮助? 如果您使用另一个函数`SetPlayerHealth`,这样你就可以存储你设置给玩家的生命值。那么就可以 100%准确地跟踪玩家的生命值状况,因此,您将有很大的机会防范生命值漏洞,因为玩家可以通过物品来获得生命值的机会非常有限,基本上只能通过自动售货机和商店。 ## 相关回调
openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerUpdate.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerUpdate.md", "repo_id": "openmultiplayer", "token_count": 2293 }
516
--- title: AddCharModel description: 添加新的自定义角色模型以供下载。 tags: [] --- <VersionWarnCN version='SA-MP 0.3.DL R1' /> ## 描述 添加新的自定义角色模型以供下载。模型文件将以 .CRC 格式存储在玩家的 Documents\GTA San Andreas User Files\SAMP\cache 的服务器 IP 和端口的文件夹中。 | 参数名 | 说明 | | ------- | ------------------------------------------------------------------------------------- | | baseid | 要使用的基础皮肤模型 ID(下载失败时要使用的角色和原始角色的行为)。 | | newid | 新的皮肤模型 ID 从 20000 到 30000(共 10000 个插槽),稍后将与 SetPlayerSkin 一起使用。 | | dffname | 默认情况下位于服务器的 models 文件夹下的 .dff 模型碰撞文件的名称(artpath 设置)。 | | txdname | 默认情况下位于服务器的 models 文件夹下的 .txd 模型纹理文件的名称(artpath 设置)。 | ## 返回值 1:函数执行成功。 0:函数执行失败。 ## 案例 ```c public OnGameModeInit() { AddCharModel(305, 20001, "lvpdpc2.dff", "lvpdpc2.txd"); AddCharModel(305, 20002, "lapdpd2.dff", "lapdpd2.txd"); return 1; } ``` ```c AddCharModel(305, 20001, "lvpdpc2.dff", "lvpdpc2.txd"); AddCharModel(305, 20002, "lapdpd2.dff", "lapdpd2.txd"); ``` ## 要点 :::tip 必须首先在服务器设置中启用 useartwork 才能工作 ::: :::warning 目前还没有限制何时可以调用这个函数,但请注意,如果你没有在 OnFilterScriptInit/OnGameModeInit 中调用它们,你就会面临一些已经在服务器上的玩家可能没有下载模型的风险。 ::: ## 相关函数 - [SetPlayerSkin](SetPlayerSkin): 设置玩家的皮肤。
openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddCharModel.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddCharModel.md", "repo_id": "openmultiplayer", "token_count": 1107 }
517
--- title: Attach3DTextLabelToVehicle description: 将一个三维文本标签附加到特定的载具上。 tags: ["vehicle", "3dtextlabel"] --- ## 描述 将一个三维文本标签附加到特定的载具上。 | 参数名 | 说明 | | --------- | ------------------------------------ | | Text3D:textid | 你想附加的三维文本标签。 | | vehicleid | 你想把三维文本标签附加在哪个载具上。 | | OffsetX | 载具的 X 坐标偏移量。 | | OffsetY | 载具的 Y 坐标偏移量。 | | OffsetZ | 载具的 Z 坐标偏移量。 | ## 返回值 该函数不返回任何特定的值。 ## 案例 ```c new Text3D:gVehicle3dText[MAX_VEHICLES], // 创建文本标签供以后使用 gVehicleId; public OnGameModeInit ( ) { gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); // 创建载具。 gVehicle3dText[gVehicleId] = Create3DTextLabel("Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1); Attach3DTextLabelToVehicle(gVehicle3dText[gVehicleId], vehicle_id, 0.0, 0.0, 2.0); // 将文本标签附加到该载具上。 } public OnGameModeExit ( ) { Delete3DTextLabel(gVehicle3dText[gVehicleId]); return true; } ``` ## 相关函数 - [Create3DTextLabel](Create3DTextLabel): 创建一个三维文本标签。 - [Delete3DTextLabel](Delete3DTextLabel): 删除一个三维文本标签。 - [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): 将三维文本标签附加到玩家身上。 - [Update3DTextLabelText](Update3DTextLabelText): 改变三维文本标签的文本内容和颜色。 - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): 为玩家创建一个三维文本标签。 - [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel): 删除一个为玩家创建的三维文本标签。 - [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): 改变玩家的三维文本标签的文本内容和颜色。
openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Attach3DTextLabelToVehicle.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/Attach3DTextLabelToVehicle.md", "repo_id": "openmultiplayer", "token_count": 1097 }
518
--- title: GetPlayerCameraUpVector description: 该函数返回一个向量,它指向玩家视角的正上方,换句话说,它指向屏幕的中上方。 tags: ["player", "camera"] --- ## 描述 该函数返回一个向量,它指向玩家视角的正上方,换句话说,它指向屏幕的中上方。 | 参数名 | 说明 | | -------- | ----------------------------------- | | playerid | 要获取视角的上向量的玩家 ID。 | | Float:x | 通过引用传递,存储 X 坐标的浮点数。 | | Float:y | 通过引用传递,存储 Y 坐标的浮点数。 | | Float:z | 通过引用传递,存储 Z 坐标的浮点数。 | ## 返回值 存储在引用传递的参数中。 ## 要点 :::warning 该函数在 SA-MP 0.3b 版本中被删除 ::: ## 相关函数 - [GetPlayerCameraPos](GetPlayerCameraPos): 找出玩家的视角在哪里。 - [GetPlayerCameraFrontVector](GetPlayerCameraFrontVector): 获取玩家视角的前向量。
openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraUpVector.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraUpVector.md", "repo_id": "openmultiplayer", "token_count": 584 }
519
--- title: floatcos description: 从特定角度求余弦值。 tags: ["math", "floating-point"] --- <LowercaseNote /> ## 描述 从特定角度求余弦值。输入的角度可以是弧度、角度或分数。 | 参数名 | 说明 | | ----------- | ------------------------------------------------------------- | | Float:value | 求余弦的角度。 | | anglemode | 要使用的[角度模式](../resources/anglemodes),取决于输入的值。 | ## 返回值 输入值的余弦值。 ## 案例 ```c public OnGameModeInit() { printf("90° 的余弦是 %f", floatcos(90.0, degrees)); // 输出: 0 return 1; } ``` ## 要点 :::warning GTA/SA-MP 在大多数情况下使用角度来表示弧度,例如[GetPlayerFacingAngle](GetPlayerFacingAngle)。因此,你很可能想要使用“角度”模式,而不是弧度。还要注意 GTA 中的角度是逆时针的;270° 为东,90° 为西。南仍然是 180°,北仍然是 0°/360°。 ::: ## 相关函数 - [floatsin](floatsin): 从特定角度求正弦值。 - [floattan](floattan): 从特定角度求正切值。
openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floatcos.md/0
{ "file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floatcos.md", "repo_id": "openmultiplayer", "token_count": 718 }
520
--- title: "Binary" description: An in depth look at binary and bitwise operators. --- ## Credits This is from a Tutorial topic in SA-MP Forums. The author is **Kyosaur**. ## What is binary? Binary is a numeral system that uses two unique symbols to represent numbers. While the more common decimal system uses ten numerals (**base 10**), binary uses only 0 and 1. This may sound useless in every day life, but binary is essential when it comes to computers. Computers at their lowest level perform all of their calculations by manipulating the flow of electricity to indicate on and off states. This is exactly what binary is, just a ton of switches flipped on and off. This is a sort of alien concept to most people, so lets take a look at the decimal and binary system next to each other. Decimal (base 10) ```c 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ``` Binary (Base 2) ```c 0 //0 1 //1 10 //2 11 //3 100 //4 101 //5 110 //6 111 //7 1000 //8 1001 //9 1010 //10 1011 //11 1100 //12 1101 //13 ``` Looking at both systems beside one another, you'll notice they behave exactly the same. Once you reach the last available number you have to move on to another place. These places in binary are referred to as bits (**b**inary dig**its**) and are simply powers of two; just as places in the decimal system are powers of 10. To prove this, lets take a look at the number 13 in standard notation. **NOTE:** '^' is power in these next few examples, not bitwise exclusive (which we'll cover later.) Decimal (base 10) ```c 13 //which equals 1 * (10^1) + 3 * (10^0) //which equals 10+3 //which equals 13 ``` Binary (base 2) ```c 1101 //which equals 1 * (2^3) + 1 * (2^2) + 0 * (2^1) + 1 * (2^0) //which equals 8+4+0+1 //which equals 13 ``` We can see from the preceding example that if a bit is set to 0, we can ignore it and move on; after all, anything multiplied by 0 is going to be 0. The previous example was a little over complicated and was just me trying to being absolutely clear. When you're converting from binary, all you really have to worry about is adding up the powers of all the bits that are turned on. Here are 12 powers of 2 just off the top of my head: ```c 4096,2048,1024,512,256,128,64,32,16,8,4,2,1 ``` If you know nothing about working with powers, this probably makes no sense to you at all. A power is a number multiplied by itself x amount of times. With this information in mind, the preceding list of powers probably makes more sense; well with the exception of 1. You may be curious why 2 raised to the power of 0 gives a result of 1, all i can say to this is that it just does. ```c 2^1 = 2, 2^3 = 4, 2^4 = 8 ``` We can see that when we move to the right, our previous value is multiplied by 2; so its safe to assume that when we move to the left our new value is just the previous number divided by 2. With this in mind you can see how we can end up with 2 to the zeroth power equaling 1. If this isn't satisfying enough, im sure you can find more proof on **\*\***. All that being said, lets take a look at one final example, and lets make it somewhat complicated! ```c 111011001011111000 //242424 //Remember, ignore the bits that arent turned on. 1 * (2^17) = 131072 1 * (2^16) = 65536 1 * (2^15) = 32768 1 * (2^13) = 8192 1 * (2^12) = 4096 1 * (2^9) = 512 1 * (2^7) = 128 1 * (2^6) = 64 1 * (2^5) = 32 1 * (2^4) = 16 1 * (2^3) = 8 131072+65536+32768+8192+4096+512+128+64+32+16+8 = 242424 ``` Remember when converting: The first power is 0 so dont make the mistake as seeing the 18th place as 2^18. There are indeed 18 powers, but that is including the power of 0, so 17 is actually our highest power. ### A deeper look at bits Most programming languages allow different data types which range in the amount of bits that can be used to store information; however pawn is a typeless 32 bit language. This means that pawn will always have 32 bits available for storing information. So what happens when you have to much information? The answer to that question lies with signed and unsigned integers. #### Signed integers Have you ever noticed that when an integer in pawn gets to high it turns into a negative? This "wrapping" is due to you go OVER the maximum value in pawn which is: ```c 2^31 - 1 //Power, not bitwise exclusive. Also the -1 is because we count 0 (there ARE 2,147,483,648 values, but that is with 0, So technically 2,147,483,647 is the max). //which equals 2,147,483,647 //which in binary is 1111111111111111111111111111111 //31 bits- all on ``` You might be wondering why THAT is the max value, and not 2^32-1 (4,294,967,295). This is where signed and unsigned integers come into play. Signed integers have the ability to store negative values, where unsigned integers do not. This might sound like im straying away from the question, but i assure you i am not. The reason the maximum integer isnt 2^32-1 is because the 32nd bit is used as a sort of toggle for negative and positive values. This is called the MSB (Most significant bit) if the MSB is turned on, the number will be negative; if its turned off, the number is positive. Pretty simple, right? Before i show a few negative values, i need to explain how negative values are represented in pawn. Pawn uses a system called 2's complement to represent negative values, which basically means you flip every single bit in your number and add 1 to the new number in order to make it negative. Lets take a look at a few negative values while this idea is still in your head: ```c 11111111111111111111111111111111 //all 32 bits turned on //equals -1 //and 11111111111111111111111111111110 //equals -2 //and finally 10000000000000000000000000000000 //equals -2147483648 ``` See, all negative numbers are simply the original positive number with all its bits flipped and increased by one. This is super clear with our last example, as the highest POSITIVE integer is 2147483647. From this we can see that the number range in pawn is actually: ```c &#8722;2^31 to +2^31 − 1 ``` #### Unsigned integers There are no such thing as unsigned integers in pawn, but im adding this just so its balanced. The only difference between a signed integer and an unsigned integer is that unsigned integers can not store negative values; Integers still wrap around, but they wrap back to 0, instead of a negative value. ## Binary Operators Binary operators allow you to manipulate individual bits of a bit pattern. Lets take a look at a list of available bitwise operators. - Bitwise arithmetic shift: >>, and << - Bitwise logical shift: >>> - Bitwise NOT (aka complement): ~ - Bitwise AND: & - Bitwise OR: | - Bitwise XOR (aka exclusive-or): ^ ### Bitwise AND **NOTE:** Not to be confused by the logical AND operator '&&' A binary AND simply takes the logical AND of the bits in each position of a number in binary form. This sounds a bit confusing, so lets take a look at it in action! ```c 1100 //12 & 0100 //4 = 0100 //4 as they both have "100" in them (which is 4) ``` That was a little easy, lets take a look at a harder one: ```c 10111000 //184 & 01001000 //72 = 00001000 //8 ``` Looking at the examples should give you a pretty good idea what this operator does. It compares two bit sets together, if both of them share a bit of 1, the result will have the same bit turned on. If they share no bits at all, then the result is 0. ### Bitwise OR **NOTE:** Not to be confused by the logical OR operator '||' Bitwise OR works almost exactly the same as bitwise AND. The only difference between the two is that bitwise OR only needs one of the two bit patterns to have a bit turned on in order for the result to have the same bit turned on. Lets take a look at a couple of examples! ```c 1100 //12 | 0100 //4 = 1100 //12. ``` Lets take a look at one more example. ```c 10111000 //184 | 01001000 //72 = 11111000 //248 ``` I think this is pretty self explanatory, if either of the numbers have a bit turned on the resulting number will also have that bit turned on. ### Bitwise XOR This operator is a little similar to the bitwise OR operator, but there is a bit of a difference. Lets look at the same example used in the bitwise OR section, and see if you can spot the difference. ```c 1100 //12 ^ 0100 //4 = 1000 //8. ``` and finally: ```c 10111000 //184 ^ 01001000 //72 = 11110000 //240 ``` ### Bitwise NOT This operator flips every bit in the bit pattern, turning all 1's to 0's and vise versa. ```c ~0 = 11111111111111111111111111111111 //-1 //and ~100 //4 = 11111111111111111111111111111011 //-5 //and ~1111111111111111111111111111111 //2147483647 (not to be confused with -1, which has 32 bits, not 31) = 10000000000000000000000000000000 //-2147483648 (32nd bit turned on) ``` If you dont understand why the negative values are sort of "backwards" please read the section about signed integers. ### Bit Shifting Bit shifting does exactly what you would imagine it does; it shifts the bits in a number towards a certain direction. If you remember earlier in the article i mentioned that PAWN has a specific memory range (32 bits that can be used for storage). What happens when you shift a number past that range? The answer to this question lies in what shifting operator you are using, and what direction you are shifting in. **NOTE:** In the following examples, all binary numbers will be written out in full (all 32 bits) to avoid any confusions. #### Arithmetic shifts #### Right shift All bits in a number are shifted x amount of times to the right when using this operator. Lets takes a quick look at a simple example. ```c 00000000000000000000000000001000 //8 >> 2 = 00000000000000000000000000000010 //2 ``` You can see from the preceding example that every bit has moved to the right by two places, and two zeros were added on the left side as padding. These two zeros are actually the value of the MSB (Most significant bit) and are very important when it comes to signed integer shifting. The reason the MSB is used as padding is so we keep the sign of the number that is being shifted. Lets take a look at the same example, except lets make it negative. ```c 11111111111111111111111111111000 //-8 >> 2 = 11111111111111111111111111111110 //-2 ``` Clearly this behaves exactly the same as the previous example, except the left bits used for padding are ones; which proves that the padding of right arithmetic shift is the value of the MSB. #### Left shift This is the exact opposite of the right arithmetic shifting operator. It shifts all the bits in a number to the left x amount of times. Lets look at an example. ```c 00000000000000000000000000001000 //8 << 2 = 00000000000000000000000000100000 //32 ``` The only difference between the left and right arithmetic shift (besides the direction of the shift) would be the way it handles padding. With the right arithmetic shift, the padding is the value of the MSB (Most significant bit), but with the left arithmetic shift the value is just 0. This is because there is no relevant information like a number's sign to keep track of. ```c 11111111111111111111111111111000 //-8 << 2 = 11111111111111111111111111100000 //-32 ``` See? Even though the padding is always 0, the sign of the number is still kept. The only thing you really have to worry about is shifting to far. If you shift a positive number past the highest possible number, it will become negative and vise versa with negative values (you'll eventually hit 0). #### Logical Shifts ##### Right Shift This is the converse to the arithmetic left shift. The best way to describe it would be a hybrid between the two arithmetic shifts. Lets take a look at it in action! ```c 00000000000000000000000000001000 //8 >>> 2 = 00000000000000000000000000000010 //2 ``` The bits in the number 8 where shifted 2 times to the right. So how is this any different from the arithmetic right shift? The answer is the padding. With the arithmetic right shift, the padding is the value of the MSB, but with the logical right shift the padding is just 0 (just as it is with the arithmetic left shift). This means that it will not keep the number of the sign, and our result will always be positive. To prove this, lets shift a negative number! ```c 11111111111111111111111111111000 //-8 >>> 2 = 00111111111111111111111111111110 //1073741822 ``` That proves that we wont get any negative values while using the logical right shift! ##### Left shift There is no logical left shift, as it would do exactly the same as the arithmetic left shift. I just added this to avoid confusion of any sort, and also to keep the section balanced.
openmultiplayer/web/docs/tutorials/Binary.md/0
{ "file_path": "openmultiplayer/web/docs/tutorials/Binary.md", "repo_id": "openmultiplayer", "token_count": 3538 }
521
# اسئله و اجوبه <hr /> <h2>ما هو اوبن ام بي؟</h2> اوبن ام بي (اوبن ملتي بلاير) هو مود ملتي بلاير احطياطي لعبه سان اندريس حيث انها تحل مشاكل سامب و تعمل مع السرفرات فقط و يمكن للعبين سامب اللعب علي هذا المود و سوف يتوافر كلينت قريبا <hr /> <h2>هل هذا تقليد؟</h2> لا حيث انه من الصفر ولكن يوجد بعض المشاكل الصعبه: <ol> <li>يوجد بعض من كود سامب لدعم السرفرات</li> <li>حيت ان لا نريد اجبار اصحاب السرفر و اللعبين علي هذه التغيرات</li> </ol> <hr /> <h2>لماذا تفعلون هذا؟</h2> بغد النظر عن المحولات لمساعده سامب و لاكن صاحب سامب لا يريد المساعده مننا و لا يريد ان يسمع الي اراء اللعبين <br /> نحن نرفض <hr /> <h2>ما هو رأيكم في سامب و كالكور</h2> نحن نحب سامب فلذاك نحن هنا من الاول و نحن نقدر كالكور عما ما فاعله حيث انه عمل بشكل جيد منذ سنين و لا نريد ان ننسي ما فعله حتا اذا كان ضدد اوبن ام بي بسبب قرارته السخيقه ولكن نحن نعمل علي تطوير سامب بشكل دقيد و نساعد اللاعبين من غير كالكور و هذا لا يعني اننا ضدده و لكن لا نقبل باي احد يسب و ياشتم اي شخض حتي و لو كانوا ضدد المود الجديد <hr /> <h2>هل هذا طريقه لتفكيك مجتمع سامب؟</h2> هذا ليس هادفنا حيث لا نريد ان يتفرق مجتمع سامب و لكن نحن مجبرون علي فعل هذا و بدليل ان هناك العديد منتظرين المود بشدة و لكن افعال كالكور هي التي تؤدي لفعل هذا حين انه حاظر و قفل من بعض الحسابات للناس في موقع سامب الرسمي بس نحن نعمل علي ان اصحاب السرفر و اللعبين يجتمعوا مع بعض حيث ان هناك الكثير منعم الذي لم يشترك في موقع سامب الاصلي <hr /> <h2>هل سيكون المود المصدر المفتوح؟</h2> تبقا لخططنا فالاجابه نعم ولكن علينا ان نتأكد انه جاهز <hr /> # اسئله و اجوبه <hr /> <h2>ما هو open.mp؟</h2> اوبن ام بي (اوبن ملتي بلاير) هو مود ملتي بلاير احطياطي لعبه سان اندريس حيث انها تحل مشاكل سامب و تعمل مع السرفرات فقط و يمكن للاعبين سامب اللعب علي هذا المود و سوف يتوافر كلينت قريبا <hr /> <h2>هل هذا تقليد؟</h2> لا حيث انه من الصفر ولكن يوجد بعض المشاكل الصعبه: <ol> <li>يوجد بعض من كود سامب لدعم السرفرات</li> <li>حيت ان لا نريد اجبار اصحاب السرفر و اللعبين علي هذه التغيرات</li> </ol> <hr /> <h2>لماذا تفعلون هذا؟</h2> بغد النظر عن المحولات لمساعده سامب و لاكن صاحب سامب لا يريد المساعده مننا و لا يريد ان يستمع الي اراء اللاعبين <br /> نحن نرفض <hr /> <h2>ما هو رأيكم في سامب و كالكور</h2> نحن نحب سامب فلذلك نحن هنا من الاول و نحن نقدر كالكور عما ما فاعله حيث انه عمل بشكل جيد منذ سنين و لا نريد ان ننسي ما فعله حتا اذا كان ضدّ اوبن ام بي بسبب قرارته السخيقه ولكن نحن نعمل علي تطوير سامب بشكل دقيد و نساعد اللاعبين من غير كالكور و هذا لا يعني اننا ضدده و لكن لا نقبل باي احد يسب و ياشتم اي شخض حتي و لو كانوا ضدد المود الجديد <hr /> <h2>هل هذا طريقه لتفكيك مجتمع سامب؟</h2> هذا ليس هدفنا حيث لا نريد ان يتفرق مجتمع سامب و لكن نحن مجبرون علي فعل هذا و بدليل ان هناك العديد منتظرين المود بشدة و لكن افعال كالكور هي التي تؤدي لفعل هذا حين انه قام بظر وقفل بعض الحسابات للناس في موقع سامب الرسمي. فنحن نعمل علي ان اصحاب السرفر و اللعبين يجتمعوا مع بعضهم حيث ان هناك الكثير منعم لم يشتركوا في موقع سامب الاصلي <hr /> <h2>هل سيكون المود المصدر المفتوح؟</h2> تبقا لخططنا فالاجابه نعم ولكن علينا ان نتأكد انه جاهز <hr /> <h2>متي موعد الاصدار الرسمي؟</h2> هذا سوأل قديم و لا يوجد اجابه له حاليا حيث انه مشروع ظخم و نحن نعمل عليه حيث يوجد البعض منا الذي لا يقدر لاعبيه <hr /> <h2>كيف اساعدكم؟</h2> يمكنكم متباعه الصفحه الأتيه علي موقع برجر شوت لتعرفوا المزيد عن هذا الموضوع <br /> <a href="https://forum.open.mp/showthread.php?tid=99"> <u>"كيف اساعدكم" صفحه</u> </a> <hr /> <h2>ما هو موقع برجر شوت؟</h2> هو موقع منتدي للتواصل مع الناس حيث انه لا يوجد علاقه بينهم و انهم لا يملكون الموقع الرسمي او المنتدي الخاص للمود <hr /> <h2>ماذا عن اوبن ملتي بروسيسنج؟</h2> هذا شي و هذا شي اخر حيث لا يوجد علاقه لالملتي بروسيسنج <h2>متي موعد الاصدار الرسمي؟</h2> هذا سوأل قديم و لا يوجد اجابه له حاليا حيث انه مشروع دغم و نحن نعمل ما يقدرنا عليه حيث يوجد البعض منا الذي لا يقدر لاعبيه <hr /> <h2>كيف اساعدكم؟</h2> يمكنكم متباعه الصفحه الأتيه علي موقع برجر شوت لتعرفوا المزيد عن هذا الموضوع <br /> <a href="https://forum.open.mp/showthread.php?tid=99"> <u>"كيف اساعدكم" صفحه</u> </a> <hr /> <h2>ما هو موقع برجر شوت؟</h2> هو موقع منتدي للتواصل مع الناس حيث انه لا يوجد علاقه بينهم و انهم لا يملكون الموقع الرسمي او المنتدي الخاص للمود <hr /> <h2>ماذا عن اوبن ملتي بروسيسنج؟</h2> هذا شي و هذا شي اخر حيث لا يوجد علاقه لالملتي بروسيسنج # اسئله و اجوبه <hr /> <h2>ما هو open.mp؟</h2> اوبن ام بي (اوبن ملتي بلاير) هو مود ملتي بلاير احطياطي لعبه سان اندريس حيث انها تحل مشاكل سامب و تعمل مع السرفرات فقط و يمكن للاعبين سامب اللعب علي هذا المود و سوف يتوافر كلينت قريبا <hr /> <h2>هل هذا تقليد؟</h2> لا حيث انه من الصفر ولكن يوجد بعض المشاكل الصعبه: <ol> <li>يوجد بعض من كود سامب لدعم السرفرات</li> <li>حيت ان لا نريد اجبار اصحاب السرفر و اللعبين علي هذه التغيرات</li> </ol> <hr /> <h2>لماذا تفعلون هذا؟</h2> بغد النظر عن المحولات لمساعده سامب و لاكن صاحب سامب لا يريد المساعده مننا و لا يريد ان يستمع الي اراء اللاعبين <br /> نحن نرفض <hr /> <h2>ما هو رأيكم في سامب و كالكور</h2> نحن نحب سامب فلذلك نحن هنا من الاول و نحن نقدر كالكور عما ما فاعله حيث انه عمل بشكل جيد منذ سنين و لا نريد ان ننسي ما فعله حتا اذا كان ضدّ اوبن ام بي بسبب قرارته السخيقه ولكن نحن نعمل علي تطوير سامب بشكل دقيد و نساعد اللاعبين من غير كالكور و هذا لا يعني اننا ضدده و لكن لا نقبل باي احد يسب و ياشتم اي شخض حتي و لو كانوا ضدد المود الجديد <hr /> <h2>هل هذا طريقه لتفكيك مجتمع سامب؟</h2> هذا ليس هدفنا حيث لا نريد ان يتفرق مجتمع سامب و لكن نحن مجبرون علي فعل هذا و بدليل ان هناك العديد منتظرين المود بشدة و لكن افعال كالكور هي التي تؤدي لفعل هذا حين انه قام بظر وقفل بعض الحسابات للناس في موقع سامب الرسمي. فنحن نعمل علي ان اصحاب السرفر و اللعبين يجتمعوا مع بعضهم حيث ان هناك الكثير منعم لم يشتركوا في موقع سامب الاصلي <hr /> <h2>هل سيكون المود المصدر المفتوح؟</h2> تبقا لخططنا فالاجابه نعم ولكن علينا ان نتأكد انه جاهز <hr /> <h2>متي موعد الاصدار الرسمي؟</h2> هذا سوأل قديم و لا يوجد اجابه له حاليا حيث انه مشروع ظخم و نحن نعمل عليه حيث يوجد البعض منا الذي لا يقدر لاعبيه <hr /> <h2>كيف اساعدكم؟</h2> يمكنكم متباعه الصفحه الأتيه علي موقع برجر شوت لتعرفوا المزيد عن هذا الموضوع <br /> <a href="https://forum.open.mp/showthread.php?tid=99"> <u>"كيف اساعدكم" صفحه</u> </a> <hr /> <h2>ما هو موقع برجر شوت؟</h2> هو موقع منتدي للتواصل مع الناس حيث انه لا يوجد علاقه بينهم و انهم لا يملكون الموقع الرسمي او المنتدي الخاص للمود <hr /> <h2>ماذا عن اوبن ملتي بروسيسنج؟</h2> هذا شي و هذا شي اخر حيث لا يوجد علاقه لالملتي بروسيسنج
openmultiplayer/web/frontend/content/ar/faq.mdx/0
{ "file_path": "openmultiplayer/web/frontend/content/ar/faq.mdx", "repo_id": "openmultiplayer", "token_count": 6088 }
522
--- title: Forum i Wiki offline description: Pitate se zašto su forum SA-MP i Wiki izvan mreže? Pročitajte ovo za informacije i sljedeće korake. --- # Zašto su Forum i Wiki offline? 25. Septembra 2020, certifikat za forum.sa-mp.com i wiki.sa-mp.com je istekao. Mnogo korisnika je ovo primjetilo i donijelo pitanje na Discord. Iako je web mjestu i dalje bilo moguće zaobići sigurnost HTTPS-a, bilo je očito da nešto veće nije u redu. Sljedećeg dana korisnici su otkrili da su obje web stranice potpuno izvan mreže s pogreškama baze podataka koje se prikazuju u pregledniku. ![https://i.imgur.com/hJLmVTo.png](https://i.imgur.com/hJLmVTo.png) Ova je pogreška prilično česta, obično označava sigurnosnu kopiju baze podataka. No, s obzirom na incident sa SSL certifikatom, to se činilo indikativnim za nešto drugo. Kasnije istog dana, obje su web stranice postale potpuno offline, čak nisu odgovorile niti stranicom s pogreškom. ![https://i.imgur.com/GjzURlq.png](https://i.imgur.com/GjzURlq.png) ## Šta ovo znači? Puno se toga nagađa u SA-MP zajednici, ali nema službene vijesti o tome što se dogodilo. Međutim, kao što smo naučili u prošlosti, najbolje je pretpostaviti najgore. Forum i Wiki vjerojatno se neće vratiti. Bilo bi sjajno da griješimo u vezi sa tim. ## Alternativa Za sada je wiki sadržaj i dalje dostupan putem [Archive.org kopija](https://web.archive.org/web/20200909122444/https://wiki.sa-mp.com/). To očito nije sjajno dugoročno rješenje. Učitavanje ovih stranica traje dugo i naglašava uslugu Archive.org (koja je već nedovoljno financirana i vrlo važan dio internetske povijesti). [Oporavljeni SA-MP Wiki](/docs) je sjajna moderna alternativa. Koristi Markdown i hostiran je pomoću GitHub-a i Vercela. Pozivamo korisnike da što više daju svoj doprinos u prenošenju svih postojećih wiki stranica na novi wiki. Više možete saznati ovdje: https://github.com/openmultiplayer/wiki/issues/27
openmultiplayer/web/frontend/content/bs/missing-sites.mdx/0
{ "file_path": "openmultiplayer/web/frontend/content/bs/missing-sites.mdx", "repo_id": "openmultiplayer", "token_count": 854 }
523
# Open Multiplayer Een opkomende multiplayer modificatie voor _Grand Theft Auto: San Andreas_ die volledig achterwaarts compatibel zal zijn met de bestaande multiplayer modificatie _San Andreas Multiplayer._ Dit betekent dat **de bestaande SA:MP client en alle bestaande SA:MP scripts zullen werken met open.mp**. Verder zullen er nog een aantal bugs opgelost worden met behulp van de server software, zodat het gebruik van hacks of andere workarounds niet langer nodig zal zijn. Mocht je je afvragen voor wanneer de publieke release gepland staat, of hoe je zelf kan bijdragen aan dit project, bekijk dan zeker [dit forum topic](https://forum.open.mp/showthread.php?tid=99) voor meer informatie. # [FAQ](/faq)
openmultiplayer/web/frontend/content/nl/index.mdx/0
{ "file_path": "openmultiplayer/web/frontend/content/nl/index.mdx", "repo_id": "openmultiplayer", "token_count": 242 }
524
# Често постављана питања. <hr /> ## Шта је open.mp? Open.mp (Open Multiplayer, OMP) је заменски мултиплејер мод за San Andreas, покренут као одговор на све већи број проблема са ажурирањима и вођењем SA:MP-a. Прво издање ће бити тренутна замена само за сервер. Већ постојећи SA:MP клијенти ће моћи да се прикљуће на овај сервер. У будућности, нови open.mp клијент ће бити доступан, дозвољавајући пуштање нових занимљивијих ажурирања. <hr /> ## Је л' ово форк? Не, ово је потпуно нов код, узимајући у обзир деценије искуства и знања. Било је покушаја форковања SA:MP-a пре, али верујемо да су имали ова два главна проблема: 1. Били су базирани на процуреном SA:MP коду. Аутори тих модова нису имали права на тај код и због тога су увек били корак у назад, како морално, тако и легално. Ми потпуно одбијамо да користимо тај код. Ово мало успорава брзину развоја, али је дугорочно прави потез. 2. Хтели су да промене превише одједном или мењајући све скриптне језике или уклањајући могућности док су додавали нове, или подешавајући ствари на некомпактибилан начин. Ово је спречило постојеће сервере са великом базом кода и играча да пређу јер би требало да поново напишу део, ако не све од њиховог кода - потенцијално велики изазов. У потпуности намеравамо да додамо нове функције и могућности током времена, али смо такође фокусирани на подршку постојећим серверима, дозвољавајући им да користе наш код, без обавезе да мењају њихов. <hr /> ## Зашто радите ово? Упркос бројним покушајима да се развој SA:MP-a званично погура, у облику предлога, понављања и нуђења помоћи од стране бета тима, заједно са заједницом која вапи за нечим новим, било чим; није виђен успех. Широко смо веровали да је то мањак интересовања руководства мода, што није проблем сам од себе, али није било трага успеха. Уместо предавања развоја онима који су имали жеље да наставе рад на моду, оснивач је просто хтео да угаси све сам, док је истовремено развлачио ствари што је дуже могуће, без икаквог труда. Неки тврде да је то због пасивних прихода, али за то нема доказа. Упркос великој жељи, јакој и породичној заједници, он је веровао да су моду остале само 1-2 године и да заједница која је радила тако јако да направи SA:MP онаквим какав је данас није заслужила да настави. Ми се не слажемо. <hr /> ## Шта мислите о Kalcor-у/SA:MP-у/шта год? Волимо SA:MP, на првом месту смо због тога овде - и дугујемо Kalcor-у за прављење истог. Кроз године, урадио је много за мод и тај допринос не сме бити заборављен или игнорисан. Акције ка open.mp су предузете јер се нисмо сложили са одређеним одлукама и упркос поновним покушајима да мод крене у погрешном правцу, нисмо видели решење. Тако смо били приморани да донесемо не баш пријатну одлуку, да покушамо да наставимо са SA:MP-ом, али без Kalcor-а. Ово није радња предузета против њега и не би требало да буде протумачена као напад на њега. Нећемо толерисати личне увреде упућене било коме - без обзира да ли је у питању open.mp; требало би да имамо дебате са разлогом, без да посежемо за ад-хоминем нападима. <hr /> ## Није ли ово само раздвајање заједнице? То није наша намера. У идеалном случају, раздвајање уопште не би било потребно, али одвојити један део и сачувати га је боље него гледати како цела ствар умире. Заправо, откако је овај мод објављен, велики број не-енглеских заједница се спојио са енглеском. Ове заједнице су пре биле потискиване и остављане по страни, тако да њихово поновно укључивање повезује подељену заједницу. Велики број људи је банован са званичног SA:MP форума (и у појединим случајевима, њихова историја је обрисана), али Kalcor је сам истакао да званични форуми нису SA:MP, само део њега. Многи играчи и власници сервера никада нису постављали или приступили овом форуму; тако да разговор са тим људима уједињује још више делова заједнице. <hr /> ## Откако је то "Open" мултиплејер, да ли ће код бити отворен? То је план, да. За сада покушавамо да направимо развој отвореним у смислу комуникације и транспарентности (која је сама од себе напредак), објавићемо код кад будемо могли, када се све среди. <hr /> ## Када ће бити доступан? Ово је вечно питање, нажалост, можемо одговорити само једнаким одговором: кад буде готово. Једноставно, немамо начин да знамо колико ће пројект као овај одузети. Тихо се ради на њему већ дуже време и већ је било неколико флуктуација са нивоом активности, зависи колико су људи заузети. Будите сигурни да је на добром путу, те се развија брзо захваљујући добрим одлукама програмерске праксе (касније ћемо рећи више о архитектури). <hr /> ## Како да помогонем? Отвори оба ока на форуму. Имамо тему баш за ово и ажурираћемо је како буде било посла. Док је пројекат откривен раније, већ смо на добром путу за прво издање, али не значи да још помоћи није добродошло. Хвала унапред за вољу и веровање у овај пројекат: ["Како да помогнем?" тема](https://forum.open.mp/showthread.php?tid=99) <hr /> ## Шта је burgershot.gg? burgershot.gg је гејминг форум, ништа више. Много људи је уклучено на оба, и помало о OMP развоју и ажурирањима се поставља ту, али су то два различита пројекта. То није OMP форум, нити је OMP burgershot-ово власништво. Чим OMP сајт буде покренут, њих двоје могу бити раздвојени (као што је SA:MP био хостан на GTAForums док није покренуо свој сајт). <hr /> ## А шта са OpenMP? Open Multi-Processing пројекат је "OpenMP", ми смо "open.mp". Тотално различито.
openmultiplayer/web/frontend/content/sr/faq.mdx/0
{ "file_path": "openmultiplayer/web/frontend/content/sr/faq.mdx", "repo_id": "openmultiplayer", "token_count": 5612 }
525
--- title: SA-MP Android (Mobile Version) date: "2021-01-30T12:46:46" author: Potassium --- Погляди команди open.mp на SA-MP для Android Привіт всім! Ми просто хотіли написати короткий допис у блозі про наші погляди на SA-MP для Android, тому що ми отримували багато коментарів з цього приводу у наших відео на YouTube та на Discord. Як ми зазначили у нашому відео YouTube, ми не підтримуємо поточну версію SA-MP для Android. Ця програма була створена з використанням вихідного коду, викраденого у команди SA-MP, що робить програму незаконною. Ми не виправдовуємо крадіжку чужого коду і не виправдовуємо використання вкраденого коду. Ми також не асоціюємося з незаконною діяльністю. Ми бачимо, що мультиплеєр GTA SA для мобільних пристроїв має велику спільноту, і ми хотіли б вітати цю спільноту у open.mp. Наразі ми обговорюємо, як ми можемо створити власний багатокористувацький мод для мобільних пристроїв SA, щоб це було зроблено легально та справедливо! :) Це означає, що цілком можливо, що в майбутньому буде open.mp для мобільних пристроїв, тому, будь ласка, продовжуйте підтримувати нас, поки ми це розберемося! Ми запрошуємо мобільну спільноту приєднатися до нашого офіційного Discord з більш ніж 10000 учасниками, ми створили для вас канал на #samp-android і з нетерпінням чекаємо ваших думок та думок! Побачимось! https://discord.gg/samp
openmultiplayer/web/frontend/content/uk/blog/samp-mobile.mdx/0
{ "file_path": "openmultiplayer/web/frontend/content/uk/blog/samp-mobile.mdx", "repo_id": "openmultiplayer", "token_count": 1328 }
526
--- title: 2022更新 - 跨平台游戏和beta测试(新年快乐 🎉) date: "2022-01-01T02:51:00" author: iAmir --- 嗨,大家好! 自 open.mp 曝光以来,经过为期 3 年的磨炼,通过实验和重写,终于来到了大家的面前。这些年来,我们一直在尝试不同的方法,以找到最适合我们和社区的途径。首先,让我讲一个小小的背景故事会比较好: 我们在 2019 年初启动了 open.mp,并在曝光后获得了大量关注。但我们没能静下心来,而是不得不仓促地开发,这在我们的管理、团队和代码库中引发了一些问题。我们离我们的目标相去甚远。我们的实践是强大的,但同时也是复杂,难以继续的。这使得我们很难遵循我们的路线图,所以我们必须做出决定,开始重写。 经过几个月的闲置,2021 年 6 月,open.mp 团队决定开始重写,目的是建立一个 1:1 的 SA:MP 服务器的替代品(一切向后兼容),并修复和增加一些特性。更专注于重要的事,在以后会增加额外的功能。 现在我们在这里,开始我们的第一个半公开的 beta 测试项目。我们邀请了拥有 Pawn 技能的服务器开发者来帮助我们检查通过所有的函数的预期结果,以及基于他们当前的 SA:MP 脚本和玩家群体进行压力测试。我们将在帖子后面提供测试版的测试人员申请表, 如果你认为能够帮助我们,请随时报名参加 :) 最后但同样重要的是,我们很高兴地宣布我们的团队开始为《侠盗猎车手:圣安地列斯最终版》开发联机客户端! open.mp 的最终版客户端将与 open.mp 服务器兼容! 所以你可以托管一个服务器,让玩家决定他们想通过哪个游戏版本游玩! 想象一下,在一个 open.mp 服务器中,使用了原版、安卓版和最终版的玩家,三者都在同一个服务器中游玩。这是我们最后也是最努力的尝试,让所有的东西都互相兼容,给社区带来跨平台的游戏体验。因此,这样一来,作为一个服务器的所有者,不必担心转移到一个新的平台,需要重新开始,甚至会分裂社区。因为我们让每个人都能在服务器上使用他们的 SA:MP 脚本,玩家可以决定使用哪款游戏来连接! 感谢大家在这漫长而疲惫的旅程中与我们在一起,我们为我们拥有的这个庞大的社区而感到自豪!新年快乐 🎉,2022 年对我们来说将是伟大的一年,也是我们心爱的 SA:MP 多人游戏模组改变的一年。来自我们所有人的爱 ❤️ 这是我们第一次尝试测试 open.mp 圣安地列斯最终版客户端的第一个版本的视频,带有 SA:MP PC 和 SA:MP Android 客户端,这三个版本都在同一个 open.mp 服务器中: https://www.youtube.com/watch?v=-PWXXvHe35M 我们的测试人员申请表可以在这里找到: https://airtable.com/shrjqca2tpgYa9sQL 提醒大家,我们目前正在为我们的 open.mp 服务器项目寻找测试人员,这与客户端无关。这是为脚本编写者/开发人员准备的,目前不是为普通玩家准备的。请不要给我们发送关于客户端的信息,如果你不能帮助我们测试 open.mp 的 服务端,请不要填写这个表格。你需要对 Pawn 语言有一定的了解,并熟悉 samp 脚本。
openmultiplayer/web/frontend/content/zh-cn/blog/update-2022.mdx/0
{ "file_path": "openmultiplayer/web/frontend/content/zh-cn/blog/update-2022.mdx", "repo_id": "openmultiplayer", "token_count": 2243 }
527
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve"> <style type="text/css"> .st0{fill:#7466D4;} </style> <path class="st0" d="M16,3C8.8,3,3,8.8,3,16v18c0,7.2,5.8,13,13,13h18c7.2,0,13-5.8,13-13V16c0-7.2-5.8-13-13-13H16z M37,11 c1.1,0,2,0.9,2,2s-0.9,2-2,2s-2-0.9-2-2S35.9,11,37,11z M25,14c6.1,0,11,4.9,11,11s-4.9,11-11,11s-11-4.9-11-11S18.9,14,25,14z M25,16c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S30,16,25,16z"/> </svg>
openmultiplayer/web/frontend/public/images/assets/instagram.svg/0
{ "file_path": "openmultiplayer/web/frontend/public/images/assets/instagram.svg", "repo_id": "openmultiplayer", "token_count": 410 }
528
import { useColorModeValue } from "@chakra-ui/react"; import Link from "next/link"; import { FC, useCallback, useRef, useState } from "react"; import { API_ADDRESS } from "src/config"; import { Hit, SearchResults } from "src/types/_generated_SearchResult"; const noExtension = (path: string) => path.replace(".md", ""); const Search: FC = () => { const searchRef = useRef<HTMLDivElement>(null); const [query, setQuery] = useState(""); const [active, setActive] = useState(false); const [results, setResults] = useState<Hit[]>([]); const searchEndpoint = (query: string) => `${API_ADDRESS}/docs/search?q=${query}`; const onChange = useCallback((event) => { const query = event.target.value; setQuery(query); if (query.length) { fetch(searchEndpoint(query)) .then((res) => res.json()) .then((res: SearchResults) => { setResults(res.hits); }); } else { setResults([]); } }, []); const onClick = useCallback((event) => { if (searchRef.current && !searchRef.current.contains(event.target)) { setActive(false); window.removeEventListener("click", onClick); } }, []); const onFocus = useCallback(() => { setActive(true); window.addEventListener("click", onClick); }, [onClick]); return ( <> <div className="container" ref={searchRef}> <input className="search" onChange={onChange} onFocus={onFocus} placeholder="Search..." type="text" value={query} /> {active && results.length > 0 && ( <ul className="results"> {results.map(({ url, title }) => ( <li className="result" key={url}> <Link href={`/${noExtension(url)}`} as={`/${noExtension(url)}`}> <a>{title}</a> </Link> </li> ))} </ul> )} </div> <style jsx>{` .container { position: relative; } .search { background-color: ${useColorModeValue('var(--chakra-colors-gray-50)', 'var(--chakra-colors-gray-800)')}; border: 1px solid rgba(0, 0, 0, 0.3); border-top-width: 0px; box-sizing: border-box; font-size: 18px; padding: 18px; width: 100%; } .results { list-style: none; overflow-x: hidden; overflow-y: scroll; margin: 0px 0 0; padding: 0; max-height: 31rem; position: absolute; border: 0px solid rgba(0, 0, 0, 0.3); border-bottom-width: 1px; left: 0; right: 0; } .result { background-color: ${useColorModeValue('var(--chakra-colors-gray-50)', 'var(--chakra-colors-gray-900)')}; padding: 18px; border: 1px solid rgba(0, 0, 0, 0.3); border-top-width: 0px; } .result:hover { background-color: ${useColorModeValue('var(--chakra-colors-gray-100)', 'var(--chakra-colors-gray-700)')}; } `}</style> </> ); }; export default Search;
openmultiplayer/web/frontend/src/components/Search.tsx/0
{ "file_path": "openmultiplayer/web/frontend/src/components/Search.tsx", "repo_id": "openmultiplayer", "token_count": 1521 }
529
import { CheckIcon, EditIcon, HamburgerIcon, NotAllowedIcon, } from "@chakra-ui/icons"; import { Box, Button, Divider, Flex, IconButton, Heading, Input, Menu, MenuButton, MenuItem, MenuList, Stack, Stat, StatLabel, StatNumber, } from "@chakra-ui/react"; import { FC, useCallback, useState, ChangeEvent } from "react"; import ReactMarkdown from "react-markdown"; import Editor from "rich-markdown-editor"; import { useAuth, useIsAdmin } from "src/auth/hooks"; import { User } from "src/types/_generated_User"; import { niceDate } from "src/utils/dates"; import { useBanStatus, useUpdateUser } from "./hooks"; import ProfilePicture from "./ProfilePicture"; type Props = { user: User; }; const MemberMenu: FC<Props & { onEdit: () => void }> = ({ user, onEdit }) => { const loggedIn = useAuth(); const isOwner = user.id === loggedIn?.user?.id; const admin = useIsAdmin(); const banstatus = useBanStatus(); const isBanned = user.deletedAt != null; const onClickBan = useCallback(() => { banstatus(user.id, !isBanned); }, [banstatus, user, isBanned]); return ( <Menu placement="left-start"> <MenuButton as={IconButton} aria-label="Options" icon={<HamburgerIcon />} variant="outline" boxSize="1.5em" borderWidth="0" ></MenuButton> <MenuList> {isOwner && ( <MenuItem icon={<EditIcon />} onClick={onEdit}> Edit </MenuItem> )} {admin && ( <MenuItem icon={<NotAllowedIcon />} onClick={onClickBan}> {isBanned ? "Unban" : "Ban"} </MenuItem> )} </MenuList> </Menu> ); }; const clean = (md: string): string => { const cleaned = md.replace(/^\\/gm, ""); return cleaned.trim(); }; const BioEditor: FC<{ bio?: string; onChange: (s: string) => void }> = ({ bio, onChange, }) => { const _onChange = useCallback( (body: () => string) => onChange(clean(body())), [onChange] ); return ( <Editor className="mv2" defaultValue={bio} onChange={_onChange} placeholder={"Enter your profile bio here"} disableExtensions={[ "container_notice", "table", "checkbox_list", "placeholder", ]} /> ); }; const MemberProfile: FC<Props> = ({ user }) => { const [editing, setEditing] = useState(false); const onEdit = useCallback(() => setEditing(true), [setEditing]); const [editedUser, setEditedUser] = useState(user); const onChangeName = useCallback( (event: ChangeEvent<HTMLInputElement>) => setEditedUser({ ...user, name: event.target.value }), [user, setEditedUser] ); const onChangeBio = useCallback( (bio: string) => setEditedUser({ ...user, bio }), [user, setEditedUser] ); const update = useUpdateUser(); const onSave = useCallback(() => { update(editedUser); setEditing(false); }, [update, editedUser]); return ( <Box as="section" height="100%"> <Flex gridGap="1em"> <Box maxW="20%" flexGrow={1}> <ProfilePicture id={user.id} size="100%" /> </Box> <Box maxW="80%" flexGrow={2}> <Stack> <Flex justifyContent="space-between" alignItems="center"> {editing ? ( <Input onChange={onChangeName} defaultValue={user.name} /> ) : ( <Heading>{user.name}</Heading> )} <MemberMenu user={user} onEdit={onEdit} /> </Flex> <Divider /> <Flex> <Stat> <StatLabel>Joined</StatLabel> <StatNumber>{niceDate(user.createdAt)}</StatNumber> </Stat> {user.deletedAt && ( <Stat color="red"> <StatLabel>Banned</StatLabel> <StatNumber>{niceDate(user.deletedAt)}</StatNumber> </Stat> )} </Flex> <Flex> <Stat> <StatLabel>Threads created</StatLabel> <StatNumber>{user.threadCount}</StatNumber> </Stat> <Stat> <StatLabel>Posts sent</StatLabel> <StatNumber>{user.postCount}</StatNumber> </Stat> </Flex> <Divider /> <Box width="80%"> hi {editing ? ( <BioEditor bio={user.bio ?? undefined} onChange={onChangeBio} /> ) : ( <ReactMarkdown> {user.bio ?? "(This user has no bio)"} </ReactMarkdown> )} </Box> {editing && ( <Box> <Button leftIcon={<CheckIcon />} colorScheme="green" variant="solid" onClick={onSave} > Save </Button> </Box> )} </Stack> </Box> </Flex> </Box> ); }; export default MemberProfile;
openmultiplayer/web/frontend/src/components/member/MemberProfile.tsx/0
{ "file_path": "openmultiplayer/web/frontend/src/components/member/MemberProfile.tsx", "repo_id": "openmultiplayer", "token_count": 2522 }
530
import Admonition from "../../../Admonition"; export default function NoteLowercase({ name = "function" }) { return ( <Admonition type="warning"> <p>Ovo {name} počinje malim slovom.</p> </Admonition> ); }
openmultiplayer/web/frontend/src/components/templates/translations/bs/lowercase-note.tsx/0
{ "file_path": "openmultiplayer/web/frontend/src/components/templates/translations/bs/lowercase-note.tsx", "repo_id": "openmultiplayer", "token_count": 86 }
531
import Admonition from "../../../Admonition"; export default function TipNPCCallbacks() { return ( <Admonition type="tip"> <p>这个回调也可以由NPC调用。</p> </Admonition> ); }
openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/npc-callbacks-tip.tsx/0
{ "file_path": "openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/npc-callbacks-tip.tsx", "repo_id": "openmultiplayer", "token_count": 93 }
532
import { Button } from "@chakra-ui/button"; import { useColorModeValue } from "@chakra-ui/color-mode"; import { ArrowForwardIcon } from "@chakra-ui/icons"; import { Box, Flex, Link, Stack, Text } from "@chakra-ui/layout"; import { Divider } from "@chakra-ui/react"; import { Stat, StatLabel, StatNumber } from "@chakra-ui/stat"; import { chakra } from "@chakra-ui/system"; import { Table, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/table"; import { formatDistance } from "date-fns"; import { GetServerSidePropsContext, GetServerSidePropsResult, NextPage, } from "next"; import { NextSeo } from "next-seo"; import { useRouter } from "next/router"; import { FC } from "react"; import ErrorBanner from "src/components/ErrorBanner"; import BackLink from "src/components/forum/BackLink"; import Measured from "src/components/generic/Measured"; import LoadingBanner from "src/components/LoadingBanner"; import { API_ADDRESS } from "src/config"; import { All } from "src/types/_generated_Server"; import useSWR from "swr"; const API_PATH = (ip: string) => `/servers/${ip}`; const API_SERVER = (ip: string) => `${API_ADDRESS}${API_PATH(ip)}`; const getServer = async (ip: string) => { const r: Response = await fetch(API_SERVER(ip)); const servers: All = await r.json(); return servers; }; type Props = { ip: string; initialData?: All; }; type ServerLinkProps = { address: string }; const ServerLink: FC<ServerLinkProps> = ({ address }) => { return ( <Link href={address} isExternal _hover={{ textDecor: "none" }}> <Button mt={"1em"} bgColor="#8477B7" color="white" border="solid 3px transparent" _hover={{ bgColor: "#AEA0E1" }} _active={{ bgColor: "#AEA0E1" }} _focus={{ border: "solid 3px #BEB5DF" }} rightIcon={<ArrowForwardIcon />} > Quick Join </Button> </Link> ); }; const Info = ({ data }: { data: All }) => ( <article> <NextSeo title={`${data.core.hn} | SA-MP Servers Index`} canonical={`https://www.open.mp/servers/${data.core.ip}`} description={`${data.core.pc}/${data.core.pm} players currently online at ${data.core.hn} (${data.core.gm}). View more information on open.mp servers list.`} /> <Flex alignItems="center" justifyContent="center"> <Box width="50em" px={8} py={8} rounded="lg" shadow="base" bg={useColorModeValue("white", "gray.800")} border="1px solid #8477B7" > <Stack spacing="4"> <Flex justifyContent="space-between" alignItems="center" wrap="wrap" gridGap="0.5em" > <chakra.span fontSize="sm" color={useColorModeValue("gray.600", "gray.400")} > {data.core.gm} </chakra.span> <Link href={`samp://${data.dm ?? data.ip}`} isExternal px={3} py={1} bg="gray.600" color="gray.100" fontSize="sm" fontWeight="700" rounded="md" _hover={{ bg: "gray.500" }} > {data.dm ?? data.ip} </Link> </Flex> <Box mt={2}> <Link fontSize="2xl" color={useColorModeValue("gray.700", "white")} fontWeight="700" _hover={{ color: useColorModeValue("gray.600", "gray.200"), textDecor: "underline", }} > {data.core.hn} </Link> </Box> <Box> {data.description ? ( <Text>{data.description}</Text> ) : ( <Text color="#9083D2">This server has no description</Text> )} </Box> <Stack spacing="4" direction={["column", "row"]} justifyContent="space-between" alignItems="start" > <Flex direction="column" justify="space-around" align="start"> <Stat> <StatLabel>Players Online</StatLabel> <StatNumber> {data.core.pc}/{data.core.pm} </StatNumber> </Stat> <Stat> <StatLabel>Mod Version</StatLabel> <StatNumber>{data.core.vn}</StatNumber> </Stat> <Stat> <StatLabel>Language</StatLabel> <StatNumber>{data.core.la}</StatNumber> </Stat> <ServerLink address={`samp://${data.dm ?? data.ip}`} /> </Flex> <Box> {data.ru !== undefined ? ( <Table variant="striped" width="full" size="sm"> <Thead> <Tr> <Th>Rule</Th> <Th>Value</Th> </Tr> </Thead> <Tbody> {Object.keys(data.ru).map((v: string) => ( <Tr key={v}> <Td>{v}</Td> <Td>{(data.ru as any)[v]}</Td> </Tr> ))} </Tbody> </Table> ) : null} </Box> </Stack> <Divider style={{ marginTop: "1.2em" }} /> <Flex justifyContent="start" m="0"> <Text color="#9083D2" m="0"> <time> {`Last updated ${formatDistance( new Date(data.lastUpdated), Date.now() )} ago`} </time> </Text> </Flex> </Stack> </Box> </Flex> </article> ); const Content = ({ ip, initialData }: Props) => { const { data, error } = useSWR<All, TypeError>(ip, getServer, { fallbackData: initialData, }); if (error) { return <ErrorBanner {...error} />; } if (!data) { return <LoadingBanner />; } return <Info data={data} />; }; const Page: NextPage<Props> = () => { const router = useRouter(); const ip = router.query["ip"] as string | undefined; if (!ip) { return <LoadingBanner />; } return ( <Measured> <section className="center mv3"> <Stack direction={["column"]} spacing="4"> <BackLink to="/servers" /> <Content ip={ip} /> </Stack> </section> <style jsx>{` section { max-width: 50em; } `}</style> </Measured> ); }; export default Page;
openmultiplayer/web/frontend/src/pages/servers/[ip].tsx/0
{ "file_path": "openmultiplayer/web/frontend/src/pages/servers/[ip].tsx", "repo_id": "openmultiplayer", "token_count": 3524 }
533
import * as z from "zod" export const HitSchema = z.object({ score: z.number(), url: z.string(), title: z.string(), desc: z.string(), title_fragment: z.string(), desc_fragment: z.string(), }) export type Hit = z.infer<typeof HitSchema> export const SearchResultsSchema = z.object({ total: z.number(), took: z.number(), hits: HitSchema.array(), }) export type SearchResults = z.infer<typeof SearchResultsSchema>
openmultiplayer/web/frontend/src/types/_generated_SearchResult.ts/0
{ "file_path": "openmultiplayer/web/frontend/src/types/_generated_SearchResult.ts", "repo_id": "openmultiplayer", "token_count": 155 }
534
4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74= github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/Netflix/go-expect v0.0.0-20200312175327-da48e75238e2/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/PuerkitoBio/goquery v1.6.0 h1:j7taAbelrdcsOlGeMenZxc2AWXD5fieT1/znArdnx94= github.com/PuerkitoBio/goquery v1.6.0/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/RoaringBitmap/roaring v0.9.4 h1:ckvZSX5gwCRaJYBNe7syNawCU5oruY9gQmjXlp4riwo= github.com/RoaringBitmap/roaring v0.9.4/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA= github.com/Southclaws/go-samp-query v1.1.3 h1:I+KKF/QW5kx1xbGPzPe60FaNaE6BQa87D+E1epkEtuI= github.com/Southclaws/go-samp-query v1.1.3/go.mod h1:veYZpOaPw6PXwvTGo9Rg3INKQV/2PR8Bn8p+bQedFNM= github.com/Southclaws/go-samp-query v1.2.0 h1:oHE0HhV55uCA3x0A4/wotABr6JdJN604DJRpeR7DQAI= github.com/Southclaws/go-samp-query v1.2.0/go.mod h1:veYZpOaPw6PXwvTGo9Rg3INKQV/2PR8Bn8p+bQedFNM= github.com/Southclaws/go-samp-query v1.2.1 h1:UOPzYdnwcZDxJ5bsZ5zZ+YOlFX8QmRLZ20YBNuKMh0Y= github.com/Southclaws/go-samp-query v1.2.1/go.mod h1:veYZpOaPw6PXwvTGo9Rg3INKQV/2PR8Bn8p+bQedFNM= github.com/Southclaws/qstring v1.1.0 h1:6Gj//09Tue8+0HtX0IAgVNAau4XZ+6TQOH7koWjdNKI= github.com/Southclaws/qstring v1.1.0/go.mod h1:3KvScfejPnEaP1scQndt0CXDTfQKDdUqbRSJxSAPZu4= github.com/Southclaws/sampctl v0.0.0-20210109143621-2daeb58d756a h1:1R7cLhxlyzWSnsHC7yqLdrgDyohJm0N4Nqos5B1LxC0= github.com/Southclaws/sampctl v0.0.0-20210109143621-2daeb58d756a/go.mod h1:W5kfjR18njBmkZdKsgAQn8yKxj7LM4D1jn9jV7dAZMc= github.com/Southclaws/supervillain v1.0.0 h1:oW/8u0Teox6k97SLZbZA1Rlyx+xZtqZjxb6K5BYK4VI= github.com/Southclaws/supervillain v1.0.0/go.mod h1:DN85eB/23vXsEmkXGZmFzWywoQ4bmaj3i548//Y2LFM= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/bbalet/stopwords v1.0.0 h1:0TnGycCtY0zZi4ltKoOGRFIlZHv0WqpoIGUsObjztfo= github.com/bbalet/stopwords v1.0.0/go.mod h1:sAWrQoDMfqARGIn4s6dp7OW7ISrshUD8IP2q3KoqPjc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= github.com/blevesearch/bleve/v2 v2.1.0 h1:SmD/DfWFrAP0TNrJagxsOR7nBt+6bUwos1MKzJInC4I= github.com/blevesearch/bleve/v2 v2.1.0/go.mod h1:49zwlH3gtzAPNNzaaekkGz5T1lB/iDnzN4hS4W0yTHE= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/bleve_index_api v1.0.1 h1:nx9++0hnyiGOHJwQQYfsUGzpRdEVE5LsylmmngQvaFk= github.com/blevesearch/bleve_index_api v1.0.1/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= github.com/blevesearch/segment v0.9.0 h1:5lG7yBCx98or7gK2cHMKPukPZ/31Kag7nONpoBt22Ac= github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= github.com/blevesearch/upsidedown_store_api v1.0.1 h1:1SYRwyoFLwG3sj0ed89RLtM15amfX2pXlYbFOnF8zNU= github.com/blevesearch/upsidedown_store_api v1.0.1/go.mod h1:MQDVGpHZrpe3Uy26zJBf/a8h0FZY6xJbthIMm8myH2Q= github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/blevesearch/zapx/v11 v11.2.2 h1:yeHRnGA4UPxVm1roONbp7VRm+SUx95AleE4rU8w4pc4= github.com/blevesearch/zapx/v11 v11.2.2/go.mod h1:qunXXAB8awrvPgnHdqbPFMW01N93bhKFxkEWxYQgp8w= github.com/blevesearch/zapx/v12 v12.2.2 h1:aK6r0DbMMI8+MnrqkmFwWxUr8ZwVwQf8owbdVv7uhKs= github.com/blevesearch/zapx/v12 v12.2.2/go.mod h1:6reJkgolYR1r7GC6SwbuRGhvMWin+Ou/n2Cd7DdvYzY= github.com/blevesearch/zapx/v13 v13.2.2 h1:6oa7kZhywrRT3CeuN0bIZC6EviQkbPOQpvdR5pnxCks= github.com/blevesearch/zapx/v13 v13.2.2/go.mod h1:EeLDRSUIMxBFwD4hZxVioHLR7gpY4VF7kdUoImp4Vy8= github.com/blevesearch/zapx/v14 v14.2.2 h1:lRZCBvQIByW8F+mCoY4uA6Uen2DCj7K+wCh5nVKNxew= github.com/blevesearch/zapx/v14 v14.2.2/go.mod h1:zb01unR63/DfV2nvyAvgj64K8AKtj7WP6w23jtuHntQ= github.com/blevesearch/zapx/v15 v15.2.2 h1:5+oWWAQTV3M0UNor05qrZujzxIXVuwtYU3ppZ7Y1aNI= github.com/blevesearch/zapx/v15 v15.2.2/go.mod h1:I4QVJ432LKkZyNK1kZkh3OweKa+NSblZzIF0YSSExak= github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bwmarrin/discordgo v0.22.0 h1:uBxY1HmlVCsW1IuaPjpCGT6A2DBwRn0nvOguQIxDdFM= github.com/bwmarrin/discordgo v0.22.0/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k= github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/forPelevin/gomoji v0.0.0-20210718160015-5fcf0e405128 h1:HKSg8Gm2YRiOtAHIpyDlegdToeYJAwXw+rfaTPc9z5M= github.com/forPelevin/gomoji v0.0.0-20210718160015-5fcf0e405128/go.mod h1:+E9vD+vXV1vqDhFt14Hd1TlqL/0wPVuE4Yh+GD4THrY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec= github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/cors v1.1.1 h1:eHuqxsIw89iXcWnWUN8R72JMibABJTN/4IOYI5WERvw= github.com/go-chi/cors v1.1.1/go.mod h1:K2Yje0VW/SJzxiyMYu6iPQYa7hMjQX2i/F491VChg1I= github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-git-fixtures/v4 v4.0.1 h1:q+IFMfLx200Q3scvt2hN79JsEzy4AmBTp/pqnefH+Bc= github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= github.com/go-git/go-git/v5 v5.0.0 h1:k5RWPm4iJwYtfWoxIJy4wJX9ON7ihPeZZYC1fLYDnpg= github.com/go-git/go-git/v5 v5.0.0/go.mod h1:oYD8y9kWsGINPFJoLdaScGCN6dlKg23blmClfZwtUVA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.41.1/go.mod h1:LPtcY3aAAU8wydHrKpnanx9Og8K/cblZSyGmI5CJZUk= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/gomarkdown/markdown v0.0.0-20211105120026-16f708f914c3 h1:YYPIb87JCyLEK3Iw/dfgmpLm2cL2Qc7JNNdYdE87b9s= github.com/gomarkdown/markdown v0.0.0-20211105120026-16f708f914c3/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v0.0.0-20180819205025-d7732128a00e h1:9POI/RDmrtowShQBeQQyCSgRHNphR9V5R1wl2b/aXU4= github.com/google/go-github v0.0.0-20180819205025-d7732128a00e/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/schema v1.2.0 h1:YufUaxZYCKGFuAq3c96BOhjgd5nmXiOY9NGzF247Tsc= github.com/gorilla/schema v1.2.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosimple/slug v1.10.0 h1:3XbiQua1IpCdrvuntWvGBxVm+K99wCSxJjlxkP49GGQ= github.com/gosimple/slug v1.10.0/go.mod h1:MICb3w495l9KNdZm+Xn5b6T2Hn831f9DMxiJ1r+bAjw= github.com/gosimple/unidecode v1.0.0 h1:kPdvM+qy0tnk4/BrnkrbdJ82xe88xn7c9hcaipDz4dQ= github.com/gosimple/unidecode v1.0.0/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.4 h1:kz40R/YWls3iqT9zX9AHN3WoVsrAWVyui5sxuLqiXqU= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= github.com/ldez/gomoddirectives v0.2.1/go.mod h1:sGicqkRgBOg//JfpXwkB9Hj0X5RyJ7mlACM5B9f6Me4= github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/mgechev/revive v1.0.7/go.mod h1:vuE5ox/4L/HDd63MCcCk3H6wTLQ6XXezRphJ8cJJOxY= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/michaelbironneau/garbler v0.0.0-20180525195632-2018e2dc9c11/go.mod h1:cC8DSoNXYzvFn9C40caxONKbrlv8YIIZU6mQeZaGsPU= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= github.com/mozilla/tls-observatory v0.0.0-20210209181001-cf43108d6880/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v0.0.0-20210510181950-ab96adb96fea/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prisma/prisma-client-go v0.16.2 h1:Yh8pHJhjicJ3Nw66X6S5/Rfp2PZQ5r5j38fd4k5Qxa8= github.com/prisma/prisma-client-go v0.16.2/go.mod h1:B1QEQQo4TLV9NzzrtOvW7pz4yOKXlxwMY0tKQivsdOU= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.2.2/go.mod h1:tpI+C/nzvfUR3bF28b5QHpTn/jM/zlGniI++6ZlIWeE= github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca h1:NugYot0LIVPxTvN8n+Kvkn6TrbMyxQiuvKdEwFdR9vI= github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= github.com/sampctl/configor v0.0.0-20200702165352-24e52bc67e97 h1:1+zk7bGDMTquPlfwRLLwlERFdgwGsVPjNH+fLbqp/d0= github.com/sampctl/configor v0.0.0-20200702165352-24e52bc67e97/go.mod h1:Qk3QrrWtIG2opjVRPXjOf9d56KRkX57ZaXyzsGActvY= github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/securego/gosec/v2 v2.8.0/go.mod h1:hJZ6NT5TqoY+jmOsaxAV4cXoEdrMRLVaNPnSpUCvCZs= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sethvargo/go-limiter v0.7.2 h1:FgC4N7RMpV5gMrUdda15FaFTkQ/L4fEqM7seXMs4oO8= github.com/sethvargo/go-limiter v0.7.2/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/gopsutil/v3 v3.21.5/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/steebchen/prisma-client-go v0.24.0 h1:zWjijUFk95KE6qVjaWoeuzghrBF0wJEXjOvyw7nSTo4= github.com/steebchen/prisma-client-go v0.24.0/go.mod h1:uLyNTrma4goWuhfbpZuxCRRennjQHJtFps0+M36Iqwc= github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/steveyen/gtreap v0.1.0 h1:CjhzTa274PyJLJuMZwIzCO1PfC00oRa8d1Kc78bFXJM= github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/takuoki/gocase v1.0.0 h1:gPwLJTWVm2T1kUiCsKirg/faaIUGVTI0FA3SYr75a44= github.com/takuoki/gocase v1.0.0/go.mod h1:QgOKJrbuJoDrtoKswBX1/Dw8mJrkOV9tbQZJaxaJ6zc= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v1.4.7/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/thanhpk/randstr v1.0.4 h1:IN78qu/bR+My+gHCvMEXhR/i5oriVHcTB/BJJIRTsNo= github.com/thanhpk/randstr v1.0.4/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U= github.com/tidwall/gjson v1.6.7 h1:Mb1M9HZCRWEcXQ8ieJo7auYyyiSux6w9XN3AdTpxJrE= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomarrell/wrapcheck v0.0.0-20200807122107-df9e8bcb914d/go.mod h1:yiFB6fFoV7saXirUGfuK+cPtUh4NX/Hf5y2WC2lehu0= github.com/tomarrell/wrapcheck/v2 v2.1.0/go.mod h1:crK5eI4RGSUrb9duDTQ5GqcukbKZvi85vX6nbhsBAeI= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd v1.3.1-0.20201008215730-16041ac3fe65/go.mod h1:T22e7iRN4LsFPZGyRLRXeF+DWVXFuV9thsyO7NjbbTI= github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= github.com/valyala/fasthttp v1.18.0 h1:IV0DdMlatq9QO1Cr6wGJPVW1sV1Q8HvZXAIcjorylyM= github.com/valyala/fasthttp v1.18.0/go.mod h1:jjraHZVbKOXftJfsOYoAjaeygpj5hr8ermTRJNroD7A= github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/victorspringer/http-cache v0.0.0-20220131145941-ef3624e6666f h1:Ms+JI9ztNft5uu+SDZq4mWjVkJwrVInU6HxP3y4TovU= github.com/victorspringer/http-cache v0.0.0-20220131145941-ef3624e6666f/go.mod h1:V7CEaXWuLs0tH3DNWqJO+GVr8YgiAwRgBh76T4LNSPU= github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/dig v1.10.0 h1:yLmDDj9/zuDjv3gz8GQGviXMs9TfysIUMUilCpgzUJY= go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.13.1 h1:CFNTr1oin5OJ0VCZ8EycL3wzF29Jz2g0xe55RFsf2a4= go.uber.org/fx v1.13.1/go.mod h1:bREWhavnedxpJeTq9pQT53BbvwhUv7TcpsOqcH4a+3w= go.uber.org/goleak v0.10.0 h1:G3eWbSNIskeRqtsN/1uI5B+eP73y3JUuBsv9AZjehb4= go.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57 h1:LQmS1nU0twXLA96Kt7U9qtHJEbBk3z6Q0V4UXjZkpr4= golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20201203001011-0b49973bad19 h1:ZD+2Sd/BnevwJp8PSli8WgGAGzb9IZtxBsv1iZMYeEA= golang.org/x/oauth2 v0.0.0-20201203001011-0b49973bad19/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191114200427-caa0b0f7d508/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023 h1:0c3L82FDQ5rt1bjTBlchS8t6RQ6299/+5bWMnRLh+uI= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1 h1:7QnIQpGRHE5RnLKnESfDoxm2dTapTZua5a0kS0A+VXQ= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= gopkg.in/AlecAivazis/survey.v1 v1.8.8/go.mod h1:CaHjv79TCgAvXMSFJSVgonHXYWxnhzI3eoHtnX5UgUo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/eapache/go-resiliency.v1 v1.2.0/go.mod h1:ufQ2tre3XZoQT9X8nKYgTaqO8DrIudC5V1EOYUwIka0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.2.0 h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE= honnef.co/go/tools v0.2.0/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
openmultiplayer/web/go.sum/0
{ "file_path": "openmultiplayer/web/go.sum", "repo_id": "openmultiplayer", "token_count": 84511 }
535
package web import ( "encoding/json" "net/http" "github.com/gorilla/schema" "github.com/pkg/errors" ) var decoder = schema.NewDecoder() func DecodeBody(r *http.Request, v interface{}) error { switch r.Header.Get("Content-Type") { case "application/json": return json.NewDecoder(r.Body).Decode(v) case "application/x-www-form-urlencoded": err := r.ParseForm() if err != nil { return errors.Wrap(err, "failed to parse form") } return decoder.Decode(v, r.PostForm) } return errors.Errorf("cannot decode content type %s", r.Header.Get("Content-Type")) }
openmultiplayer/web/internal/web/payload.go/0
{ "file_path": "openmultiplayer/web/internal/web/payload.go", "repo_id": "openmultiplayer", "token_count": 225 }
536
-- AlterTable ALTER TABLE "User" ADD COLUMN "lastActive" TIMESTAMP(3);
openmultiplayer/web/prisma/migrations/20231022180059_add_lastactive_field/migration.sql/0
{ "file_path": "openmultiplayer/web/prisma/migrations/20231022180059_add_lastactive_field/migration.sql", "repo_id": "openmultiplayer", "token_count": 29 }
537
# the base image is suitable for running web with /app bind mounted FROM node:12.22.3 as base WORKDIR /app # install_deps changes app files and installs npm packages # as such it has to run at a later stage RUN apt-get update \ && apt-get install -y parallel \ && rm -rf /var/lib/apt/lists/* RUN mkdir /app/node_modules && chown node:node /app/node_modules # the deps image is used for caching npm ci FROM base as deps COPY package.json package-lock.json /app/ RUN npm ci --quiet # the dev is suitable for running tests FROM deps as dev COPY . /app RUN mkdir -p /app/data/dumpFolder && \ mkdir -p /app/data/logs && \ mkdir -p /app/data/pdf && \ mkdir -p /app/data/uploads && \ mkdir -p /app/data/zippedProjects && \ chmod -R 0755 /app/data/ && \ chown -R node:node /app/data/ ARG SENTRY_RELEASE ENV SENTRY_RELEASE=$SENTRY_RELEASE USER node # the webpack image has deps+src+webpack artifacts FROM dev as webpack USER root RUN chmod 0755 ./install_deps.sh && ./install_deps.sh # the final production image without webpack source maps FROM webpack as app RUN find /app/public -name '*.js.map' -delete RUN rm /app/modules/server-ce-scripts -rf USER node CMD ["node", "--expose-gc", "app.js"]
overleaf/web/Dockerfile/0
{ "file_path": "overleaf/web/Dockerfile", "repo_id": "overleaf", "token_count": 450 }
538
const Settings = require('@overleaf/settings') const { User } = require('../../models/User') const { db, ObjectId } = require('../../infrastructure/mongodb') const bcrypt = require('bcrypt') const EmailHelper = require('../Helpers/EmailHelper') const { InvalidEmailError, InvalidPasswordError, } = require('./AuthenticationErrors') const util = require('util') const BCRYPT_ROUNDS = Settings.security.bcryptRounds || 12 const BCRYPT_MINOR_VERSION = Settings.security.bcryptMinorVersion || 'a' const _checkWriteResult = function (result, callback) { // for MongoDB if (result && result.modifiedCount === 1) { callback(null, true) } else { callback(null, false) } } const AuthenticationManager = { authenticate(query, password, callback) { // Using Mongoose for legacy reasons here. The returned User instance // gets serialized into the session and there may be subtle differences // between the user returned by Mongoose vs mongodb (such as default values) User.findOne(query, (error, user) => { if (error) { return callback(error) } if (!user || !user.hashedPassword) { return callback(null, null) } bcrypt.compare(password, user.hashedPassword, function (error, match) { if (error) { return callback(error) } if (!match) { return callback(null, null) } AuthenticationManager.checkRounds( user, user.hashedPassword, password, function (err) { if (err) { return callback(err) } callback(null, user) } ) }) }) }, validateEmail(email) { const parsed = EmailHelper.parseEmail(email) if (!parsed) { return new InvalidEmailError({ message: 'email not valid' }) } return null }, // validates a password based on a similar set of rules to `complexPassword.js` on the frontend // note that `passfield.js` enforces more rules than this, but these are the most commonly set. // returns null on success, or an error object. validatePassword(password, email) { if (password == null) { return new InvalidPasswordError({ message: 'password not set', info: { code: 'not_set' }, }) } let allowAnyChars, min, max if (Settings.passwordStrengthOptions) { allowAnyChars = Settings.passwordStrengthOptions.allowAnyChars === true if (Settings.passwordStrengthOptions.length) { min = Settings.passwordStrengthOptions.length.min max = Settings.passwordStrengthOptions.length.max } } allowAnyChars = !!allowAnyChars min = min || 6 max = max || 72 // we don't support passwords > 72 characters in length, because bcrypt truncates them if (max > 72) { max = 72 } if (password.length < min) { return new InvalidPasswordError({ message: 'password is too short', info: { code: 'too_short' }, }) } if (password.length > max) { return new InvalidPasswordError({ message: 'password is too long', info: { code: 'too_long' }, }) } if ( !allowAnyChars && !AuthenticationManager._passwordCharactersAreValid(password) ) { return new InvalidPasswordError({ message: 'password contains an invalid character', info: { code: 'invalid_character' }, }) } if (typeof email === 'string' && email !== '') { const startOfEmail = email.split('@')[0] if ( password.indexOf(email) !== -1 || password.indexOf(startOfEmail) !== -1 ) { return new InvalidPasswordError({ message: 'password contains part of email address', info: { code: 'contains_email' }, }) } } return null }, setUserPassword(user, password, callback) { AuthenticationManager.setUserPasswordInV2(user, password, callback) }, checkRounds(user, hashedPassword, password, callback) { // Temporarily disable this function, TODO: re-enable this if (Settings.security.disableBcryptRoundsUpgrades) { return callback() } // check current number of rounds and rehash if necessary const currentRounds = bcrypt.getRounds(hashedPassword) if (currentRounds < BCRYPT_ROUNDS) { AuthenticationManager.setUserPassword(user, password, callback) } else { callback() } }, hashPassword(password, callback) { bcrypt.genSalt(BCRYPT_ROUNDS, BCRYPT_MINOR_VERSION, function (error, salt) { if (error) { return callback(error) } bcrypt.hash(password, salt, callback) }) }, setUserPasswordInV2(user, password, callback) { if (!user || !user.email || !user._id) { return callback(new Error('invalid user object')) } const validationError = this.validatePassword(password, user.email) if (validationError) { return callback(validationError) } this.hashPassword(password, function (error, hash) { if (error) { return callback(error) } db.users.updateOne( { _id: ObjectId(user._id.toString()), }, { $set: { hashedPassword: hash, }, $unset: { password: true, }, }, function (updateError, result) { if (updateError) { return callback(updateError) } _checkWriteResult(result, callback) } ) }) }, _passwordCharactersAreValid(password) { let digits, letters, lettersUp, symbols if ( Settings.passwordStrengthOptions && Settings.passwordStrengthOptions.chars ) { digits = Settings.passwordStrengthOptions.chars.digits letters = Settings.passwordStrengthOptions.chars.letters lettersUp = Settings.passwordStrengthOptions.chars.letters_up symbols = Settings.passwordStrengthOptions.chars.symbols } digits = digits || '1234567890' letters = letters || 'abcdefghijklmnopqrstuvwxyz' lettersUp = lettersUp || 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' symbols = symbols || '@#$%^&*()-_=+[]{};:<>/?!£€.,' for (let charIndex = 0; charIndex <= password.length - 1; charIndex++) { if ( digits.indexOf(password[charIndex]) === -1 && letters.indexOf(password[charIndex]) === -1 && lettersUp.indexOf(password[charIndex]) === -1 && symbols.indexOf(password[charIndex]) === -1 ) { return false } } return true }, } AuthenticationManager.promises = { authenticate: util.promisify(AuthenticationManager.authenticate), hashPassword: util.promisify(AuthenticationManager.hashPassword), setUserPassword: util.promisify(AuthenticationManager.setUserPassword), } module.exports = AuthenticationManager
overleaf/web/app/src/Features/Authentication/AuthenticationManager.js/0
{ "file_path": "overleaf/web/app/src/Features/Authentication/AuthenticationManager.js", "repo_id": "overleaf", "token_count": 2694 }
539
const { callbackify } = require('util') const OError = require('@overleaf/o-error') const { Project } = require('../../models/Project') const ProjectGetter = require('../Project/ProjectGetter') const ProjectHelper = require('../Project/ProjectHelper') const logger = require('logger-sharelatex') const ContactManager = require('../Contacts/ContactManager') const PrivilegeLevels = require('../Authorization/PrivilegeLevels') const TpdsProjectFlusher = require('../ThirdPartyDataStore/TpdsProjectFlusher') const CollaboratorsGetter = require('./CollaboratorsGetter') const Errors = require('../Errors/Errors') module.exports = { userIsTokenMember: callbackify(userIsTokenMember), removeUserFromProject: callbackify(removeUserFromProject), removeUserFromAllProjects: callbackify(removeUserFromAllProjects), addUserIdToProject: callbackify(addUserIdToProject), transferProjects: callbackify(transferProjects), promises: { userIsTokenMember, removeUserFromProject, removeUserFromAllProjects, addUserIdToProject, transferProjects, setCollaboratorPrivilegeLevel, }, } async function removeUserFromProject(projectId, userId) { try { const project = await Project.findOne({ _id: projectId }).exec() // Deal with the old type of boolean value for archived // In order to clear it if (typeof project.archived === 'boolean') { let archived = ProjectHelper.calculateArchivedArray( project, userId, 'ARCHIVE' ) archived = archived.filter(id => id.toString() !== userId.toString()) await Project.updateOne( { _id: projectId }, { $set: { archived: archived }, $pull: { collaberator_refs: userId, readOnly_refs: userId, tokenAccessReadOnly_refs: userId, tokenAccessReadAndWrite_refs: userId, trashed: userId, }, } ) } else { await Project.updateOne( { _id: projectId }, { $pull: { collaberator_refs: userId, readOnly_refs: userId, tokenAccessReadOnly_refs: userId, tokenAccessReadAndWrite_refs: userId, archived: userId, trashed: userId, }, } ) } } catch (err) { throw OError.tag(err, 'problem removing user from project collaborators', { projectId, userId, }) } } async function removeUserFromAllProjects(userId) { const { readAndWrite, readOnly, tokenReadAndWrite, tokenReadOnly, } = await CollaboratorsGetter.promises.getProjectsUserIsMemberOf(userId, { _id: 1, }) const allProjects = readAndWrite .concat(readOnly) .concat(tokenReadAndWrite) .concat(tokenReadOnly) for (const project of allProjects) { await removeUserFromProject(project._id, userId) } } async function addUserIdToProject( projectId, addingUserId, userId, privilegeLevel ) { const project = await ProjectGetter.promises.getProject(projectId, { collaberator_refs: 1, readOnly_refs: 1, }) let level let existingUsers = project.collaberator_refs || [] existingUsers = existingUsers.concat(project.readOnly_refs || []) existingUsers = existingUsers.map(u => u.toString()) if (existingUsers.includes(userId.toString())) { return // User already in Project } if (privilegeLevel === PrivilegeLevels.READ_AND_WRITE) { level = { collaberator_refs: userId } logger.log({ privileges: 'readAndWrite', userId, projectId }, 'adding user') } else if (privilegeLevel === PrivilegeLevels.READ_ONLY) { level = { readOnly_refs: userId } logger.log({ privileges: 'readOnly', userId, projectId }, 'adding user') } else { throw new Error(`unknown privilegeLevel: ${privilegeLevel}`) } if (addingUserId) { ContactManager.addContact(addingUserId, userId) } await Project.updateOne({ _id: projectId }, { $addToSet: level }).exec() // Flush to TPDS in background to add files to collaborator's Dropbox TpdsProjectFlusher.promises.flushProjectToTpds(projectId).catch(err => { logger.error( { err, projectId, userId }, 'error flushing to TPDS after adding collaborator' ) }) } async function transferProjects(fromUserId, toUserId) { // Find all the projects this user is part of so we can flush them to TPDS const projects = await Project.find( { $or: [ { owner_ref: fromUserId }, { collaberator_refs: fromUserId }, { readOnly_refs: fromUserId }, ], }, { _id: 1 } ).exec() const projectIds = projects.map(p => p._id) logger.log({ projectIds, fromUserId, toUserId }, 'transferring projects') await Project.updateMany( { owner_ref: fromUserId }, { $set: { owner_ref: toUserId } } ).exec() await Project.updateMany( { collaberator_refs: fromUserId }, { $addToSet: { collaberator_refs: toUserId }, } ).exec() await Project.updateMany( { collaberator_refs: fromUserId }, { $pull: { collaberator_refs: fromUserId }, } ).exec() await Project.updateMany( { readOnly_refs: fromUserId }, { $addToSet: { readOnly_refs: toUserId }, } ).exec() await Project.updateMany( { readOnly_refs: fromUserId }, { $pull: { readOnly_refs: fromUserId }, } ).exec() // Flush in background, no need to block on this _flushProjects(projectIds).catch(err => { logger.err( { err, projectIds, fromUserId, toUserId }, 'error flushing tranferred projects to TPDS' ) }) } async function setCollaboratorPrivilegeLevel( projectId, userId, privilegeLevel ) { // Make sure we're only updating the project if the user is already a // collaborator const query = { _id: projectId, $or: [{ collaberator_refs: userId }, { readOnly_refs: userId }], } let update switch (privilegeLevel) { case PrivilegeLevels.READ_AND_WRITE: { update = { $pull: { readOnly_refs: userId }, $addToSet: { collaberator_refs: userId }, } break } case PrivilegeLevels.READ_ONLY: { update = { $pull: { collaberator_refs: userId }, $addToSet: { readOnly_refs: userId }, } break } default: { throw new OError(`unknown privilege level: ${privilegeLevel}`) } } const mongoResponse = await Project.updateOne(query, update).exec() if (mongoResponse.n === 0) { throw new Errors.NotFoundError('project or collaborator not found') } } async function userIsTokenMember(userId, projectId) { if (!userId) { return false } try { const project = await Project.findOne( { _id: projectId, $or: [ { tokenAccessReadOnly_refs: userId }, { tokenAccessReadAndWrite_refs: userId }, ], }, { _id: 1, } ) return project != null } catch (err) { throw OError.tag(err, 'problem while checking if user is token member', { userId, projectId, }) } } async function _flushProjects(projectIds) { for (const projectId of projectIds) { await TpdsProjectFlusher.promises.flushProjectToTpds(projectId) } }
overleaf/web/app/src/Features/Collaborators/CollaboratorsHandler.js/0
{ "file_path": "overleaf/web/app/src/Features/Collaborators/CollaboratorsHandler.js", "repo_id": "overleaf", "token_count": 2853 }
540
/* eslint-disable camelcase, node/handle-callback-err, max-len, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const request = require('request').defaults({ jar: false }) const OError = require('@overleaf/o-error') const logger = require('logger-sharelatex') const settings = require('@overleaf/settings') const Errors = require('../Errors/Errors') const { promisifyAll } = require('../../util/promises') const TIMEOUT = 30 * 1000 // request timeout const DocstoreManager = { deleteDoc(project_id, doc_id, name, deletedAt, callback) { if (callback == null) { callback = function (error) {} } const url = `${settings.apis.docstore.url}/project/${project_id}/doc/${doc_id}` const docMetaData = { deleted: true, deletedAt, name } const options = { url, json: docMetaData, timeout: TIMEOUT } request.patch(options, function (error, res) { if (error != null) { return callback(error) } if (res.statusCode >= 200 && res.statusCode < 300) { return callback(null) } else if (res.statusCode === 404) { error = new Errors.NotFoundError({ message: 'tried to delete doc not in docstore', info: { project_id, doc_id, }, }) return callback(error) // maybe suppress the error when delete doc which is not present? } else { error = new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id, doc_id, } ) return callback(error) } }) }, getAllDocs(project_id, callback) { if (callback == null) { callback = function (error) {} } const url = `${settings.apis.docstore.url}/project/${project_id}/doc` return request.get( { url, timeout: TIMEOUT, json: true, }, function (error, res, docs) { if (error != null) { return callback(error) } if (res.statusCode >= 200 && res.statusCode < 300) { return callback(null, docs) } else { error = new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id } ) return callback(error) } } ) }, getAllDeletedDocs(project_id, callback) { const url = `${settings.apis.docstore.url}/project/${project_id}/doc-deleted` request.get( { url, timeout: TIMEOUT, json: true }, function (error, res, docs) { if (error) { callback( OError.tag(error, 'could not get deleted docs from docstore') ) } else if (res.statusCode === 200) { callback(null, docs) } else { callback( new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id } ) ) } } ) }, getAllRanges(project_id, callback) { if (callback == null) { callback = function (error) {} } const url = `${settings.apis.docstore.url}/project/${project_id}/ranges` return request.get( { url, timeout: TIMEOUT, json: true, }, function (error, res, docs) { if (error != null) { return callback(error) } if (res.statusCode >= 200 && res.statusCode < 300) { return callback(null, docs) } else { error = new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id } ) return callback(error) } } ) }, getDoc(project_id, doc_id, options, callback) { if (options == null) { options = {} } if (callback == null) { callback = function (error, lines, rev, version) {} } if (typeof options === 'function') { callback = options options = {} } let url = `${settings.apis.docstore.url}/project/${project_id}/doc/${doc_id}` if (options.include_deleted) { url += '?include_deleted=true' } return request.get( { url, timeout: TIMEOUT, json: true, }, function (error, res, doc) { if (error != null) { return callback(error) } if (res.statusCode >= 200 && res.statusCode < 300) { logger.log( { doc_id, project_id, version: doc.version, rev: doc.rev }, 'got doc from docstore api' ) return callback(null, doc.lines, doc.rev, doc.version, doc.ranges) } else if (res.statusCode === 404) { error = new Errors.NotFoundError({ message: 'doc not found in docstore', info: { project_id, doc_id, }, }) return callback(error) } else { error = new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id, doc_id, } ) return callback(error) } } ) }, isDocDeleted(project_id, doc_id, callback) { const url = `${settings.apis.docstore.url}/project/${project_id}/doc/${doc_id}/deleted` request.get( { url, timeout: TIMEOUT, json: true }, function (err, res, body) { if (err) { callback(err) } else if (res.statusCode === 200) { callback(null, body.deleted) } else if (res.statusCode === 404) { callback( new Errors.NotFoundError({ message: 'doc does not exist in project', info: { project_id, doc_id }, }) ) } else { callback( new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id, doc_id } ) ) } } ) }, updateDoc(project_id, doc_id, lines, version, ranges, callback) { if (callback == null) { callback = function (error, modified, rev) {} } const url = `${settings.apis.docstore.url}/project/${project_id}/doc/${doc_id}` return request.post( { url, timeout: TIMEOUT, json: { lines, version, ranges, }, }, function (error, res, result) { if (error != null) { return callback(error) } if (res.statusCode >= 200 && res.statusCode < 300) { logger.log( { project_id, doc_id }, 'update doc in docstore url finished' ) return callback(null, result.modified, result.rev) } else { error = new OError( `docstore api responded with non-success code: ${res.statusCode}`, { project_id, doc_id } ) return callback(error) } } ) }, archiveProject(project_id, callback) { DocstoreManager._operateOnProject(project_id, 'archive', callback) }, unarchiveProject(project_id, callback) { DocstoreManager._operateOnProject(project_id, 'unarchive', callback) }, destroyProject(project_id, callback) { DocstoreManager._operateOnProject(project_id, 'destroy', callback) }, _operateOnProject(project_id, method, callback) { const url = `${settings.apis.docstore.url}/project/${project_id}/${method}` logger.log({ project_id }, `calling ${method} for project in docstore`) // use default timeout for archiving/unarchiving/destroying request.post(url, function (err, res, docs) { if (err != null) { OError.tag(err, `error calling ${method} project in docstore`, { project_id, }) return callback(err) } if (res.statusCode >= 200 && res.statusCode < 300) { callback() } else { const error = new Error( `docstore api responded with non-success code: ${res.statusCode}` ) logger.warn( { err: error, project_id }, `error calling ${method} project in docstore` ) callback(error) } }) }, } module.exports = DocstoreManager module.exports.promises = promisifyAll(DocstoreManager, { multiResult: { getDoc: ['lines', 'rev', 'version', 'ranges'], updateDoc: ['modified', 'rev'], }, })
overleaf/web/app/src/Features/Docstore/DocstoreManager.js/0
{ "file_path": "overleaf/web/app/src/Features/Docstore/DocstoreManager.js", "repo_id": "overleaf", "token_count": 4021 }
541
const { callbackify } = require('util') const logger = require('logger-sharelatex') const metrics = require('@overleaf/metrics') const Settings = require('@overleaf/settings') const nodemailer = require('nodemailer') const sesTransport = require('nodemailer-ses-transport') const mandrillTransport = require('nodemailer-mandrill-transport') const OError = require('@overleaf/o-error') const RateLimiter = require('../../infrastructure/RateLimiter') const _ = require('underscore') const EMAIL_SETTINGS = Settings.email || {} module.exports = { sendEmail: callbackify(sendEmail), promises: { sendEmail, }, } const client = getClient() function getClient() { let client if (EMAIL_SETTINGS.parameters) { const emailParameters = EMAIL_SETTINGS.parameters if (emailParameters.AWSAccessKeyID || EMAIL_SETTINGS.driver === 'ses') { logger.log('using aws ses for email') client = nodemailer.createTransport(sesTransport(emailParameters)) } else if (emailParameters.sendgridApiKey) { throw new OError( 'sendgridApiKey configuration option is deprecated, use SMTP instead' ) } else if (emailParameters.MandrillApiKey) { logger.log('using mandril for email') client = nodemailer.createTransport( mandrillTransport({ auth: { apiKey: emailParameters.MandrillApiKey, }, }) ) } else { logger.log('using smtp for email') const smtp = _.pick( emailParameters, 'host', 'port', 'secure', 'auth', 'ignoreTLS', 'logger', 'name' ) client = nodemailer.createTransport(smtp) } } else { logger.warn( 'Email transport and/or parameters not defined. No emails will be sent.' ) client = { async sendMail(options) { logger.log({ options }, 'Would send email if enabled.') }, } } return client } async function sendEmail(options) { try { const canContinue = await checkCanSendEmail(options) if (!canContinue) { logger.log( { sendingUser_id: options.sendingUser_id, to: options.to, subject: options.subject, canContinue, }, 'rate limit hit for sending email, not sending' ) throw new OError('rate limit hit sending email') } metrics.inc('email') const sendMailOptions = { to: options.to, from: EMAIL_SETTINGS.fromAddress || '', subject: options.subject, html: options.html, text: options.text, replyTo: options.replyTo || EMAIL_SETTINGS.replyToAddress, socketTimeout: 30 * 1000, } if (EMAIL_SETTINGS.textEncoding != null) { sendMailOptions.textEncoding = EMAIL_SETTINGS.textEncoding } await client.sendMail(sendMailOptions) } catch (err) { throw new OError('error sending message').withCause(err) } } async function checkCanSendEmail(options) { if (options.sendingUser_id == null) { // email not sent from user, not rate limited return true } const opts = { endpointName: 'send_email', timeInterval: 60 * 60 * 3, subjectName: options.sendingUser_id, throttle: 100, } const allowed = await RateLimiter.promises.addCount(opts) return allowed }
overleaf/web/app/src/Features/Email/EmailSender.js/0
{ "file_path": "overleaf/web/app/src/Features/Email/EmailSender.js", "repo_id": "overleaf", "token_count": 1313 }
542
const OError = require('@overleaf/o-error') const { ObjectId } = require('mongodb') const { ObjectId: MongooseObjectId } = require('mongoose').mongo function _getObjectIdInstance(id) { if (typeof id === 'string') { return ObjectId(id) } else if (id instanceof ObjectId) { return id } else if (id instanceof MongooseObjectId) { return ObjectId(id.toString()) } else { throw new OError('unexpected object id', { id }) } } function normalizeQuery(query) { if (!query) { throw new Error('no query provided') } if ( typeof query === 'string' || query instanceof ObjectId || query instanceof MongooseObjectId ) { return { _id: _getObjectIdInstance(query) } } else if (typeof query._id === 'string') { query._id = ObjectId(query._id) return query } else { return query } } function normalizeMultiQuery(query) { if (Array.isArray(query)) { return { _id: { $in: query.map(id => _getObjectIdInstance(id)) } } } else { return normalizeQuery(query) } } function isObjectIdInstance(id) { return id instanceof ObjectId || id instanceof MongooseObjectId } module.exports = { isObjectIdInstance, normalizeQuery, normalizeMultiQuery, }
overleaf/web/app/src/Features/Helpers/Mongo.js/0
{ "file_path": "overleaf/web/app/src/Features/Helpers/Mongo.js", "repo_id": "overleaf", "token_count": 432 }
543
/* eslint-disable camelcase, max-len, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let LinkedFilesController const SessionManager = require('../Authentication/SessionManager') const EditorController = require('../Editor/EditorController') const ProjectLocator = require('../Project/ProjectLocator') const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const _ = require('underscore') const LinkedFilesHandler = require('./LinkedFilesHandler') const { CompileFailedError, UrlFetchFailedError, InvalidUrlError, OutputFileFetchFailedError, AccessDeniedError, BadEntityTypeError, BadDataError, ProjectNotFoundError, V1ProjectNotFoundError, SourceFileNotFoundError, NotOriginalImporterError, FeatureNotAvailableError, RemoteServiceError, FileCannotRefreshError, } = require('./LinkedFilesErrors') const Modules = require('../../infrastructure/Modules') module.exports = LinkedFilesController = { Agents: _.extend( { url: require('./UrlAgent'), project_file: require('./ProjectFileAgent'), project_output_file: require('./ProjectOutputFileAgent'), }, Modules.linkedFileAgentsIncludes() ), _getAgent(provider) { if ( !Object.prototype.hasOwnProperty.call( LinkedFilesController.Agents, provider ) ) { return null } if (!Array.from(Settings.enabledLinkedFileTypes).includes(provider)) { return null } return LinkedFilesController.Agents[provider] }, createLinkedFile(req, res, next) { const { project_id } = req.params const { name, provider, data, parent_folder_id } = req.body const user_id = SessionManager.getLoggedInUserId(req.session) const Agent = LinkedFilesController._getAgent(provider) if (Agent == null) { return res.sendStatus(400) } data.provider = provider return Agent.createLinkedFile( project_id, data, name, parent_folder_id, user_id, function (err, newFileId) { if (err != null) { return LinkedFilesController.handleError(err, req, res, next) } return res.json({ new_file_id: newFileId }) } ) }, refreshLinkedFile(req, res, next) { const { project_id, file_id } = req.params const user_id = SessionManager.getLoggedInUserId(req.session) return LinkedFilesHandler.getFileById( project_id, file_id, function (err, file, path, parentFolder) { if (err != null) { return next(err) } if (file == null) { return res.sendStatus(404) } const { name } = file const { linkedFileData } = file if ( linkedFileData == null || (linkedFileData != null ? linkedFileData.provider : undefined) == null ) { return res.sendStatus(409) } const { provider } = linkedFileData const parent_folder_id = parentFolder._id const Agent = LinkedFilesController._getAgent(provider) if (Agent == null) { return res.sendStatus(400) } return Agent.refreshLinkedFile( project_id, linkedFileData, name, parent_folder_id, user_id, function (err, newFileId) { if (err != null) { return LinkedFilesController.handleError(err, req, res, next) } return res.json({ new_file_id: newFileId }) } ) } ) }, handleError(error, req, res, next) { if (error instanceof AccessDeniedError) { return res.status(403).send('You do not have access to this project') } else if (error instanceof BadDataError) { return res.status(400).send('The submitted data is not valid') } else if (error instanceof BadEntityTypeError) { return res.status(400).send('The file is the wrong type') } else if (error instanceof SourceFileNotFoundError) { return res.status(404).send('Source file not found') } else if (error instanceof ProjectNotFoundError) { return res.status(404).send('Project not found') } else if (error instanceof V1ProjectNotFoundError) { return res .status(409) .send( 'Sorry, the source project is not yet imported to Overleaf v2. Please import it to Overleaf v2 to refresh this file' ) } else if (error instanceof CompileFailedError) { return res .status(422) .send(res.locals.translate('generic_linked_file_compile_error')) } else if (error instanceof OutputFileFetchFailedError) { return res.status(404).send('Could not get output file') } else if (error instanceof UrlFetchFailedError) { return res .status(422) .send( `Your URL could not be reached (${error.statusCode} status code). Please check it and try again.` ) } else if (error instanceof InvalidUrlError) { return res .status(422) .send('Your URL is not valid. Please check it and try again.') } else if (error instanceof NotOriginalImporterError) { return res .status(400) .send('You are not the user who originally imported this file') } else if (error instanceof FeatureNotAvailableError) { return res.status(400).send('This feature is not enabled on your account') } else if (error instanceof RemoteServiceError) { return res.status(502).send('The remote service produced an error') } else if (error instanceof FileCannotRefreshError) { return res.status(400).send('This file cannot be refreshed') } else if (error.message === 'project_has_too_many_files') { return res.status(400).send('too many files') } else if (/\bECONNREFUSED\b/.test(error.message)) { return res .status(500) .send('Importing references is not currently available') } else { return next(error) } }, }
overleaf/web/app/src/Features/LinkedFiles/LinkedFilesController.js/0
{ "file_path": "overleaf/web/app/src/Features/LinkedFiles/LinkedFilesController.js", "repo_id": "overleaf", "token_count": 2444 }
544
const PasswordResetController = require('./PasswordResetController') const AuthenticationController = require('../Authentication/AuthenticationController') const CaptchaMiddleware = require('../../Features/Captcha/CaptchaMiddleware') const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware') const { Joi, validate } = require('../../infrastructure/Validation') module.exports = { apply(webRouter, apiRouter) { const rateLimit = RateLimiterMiddleware.rateLimit({ endpointName: 'password_reset_rate_limit', ipOnly: true, maxRequests: 6, timeInterval: 60, }) webRouter.get( '/user/password/reset', PasswordResetController.renderRequestResetForm ) webRouter.post( '/user/password/reset', validate({ body: Joi.object({ email: Joi.string().required(), }), }), rateLimit, CaptchaMiddleware.validateCaptcha('passwordReset'), PasswordResetController.requestReset ) AuthenticationController.addEndpointToLoginWhitelist('/user/password/reset') webRouter.get( '/user/password/set', PasswordResetController.renderSetPasswordForm ) webRouter.post( '/user/password/set', validate({ body: Joi.object({ password: Joi.string().required(), passwordResetToken: Joi.string().required(), }), }), rateLimit, PasswordResetController.setNewUserPassword ) AuthenticationController.addEndpointToLoginWhitelist('/user/password/set') webRouter.post( '/user/reconfirm', validate({ body: Joi.object({ email: Joi.string().required(), }), }), rateLimit, CaptchaMiddleware.validateCaptcha('passwordReset'), PasswordResetController.requestReset ) }, }
overleaf/web/app/src/Features/PasswordReset/PasswordResetRouter.js/0
{ "file_path": "overleaf/web/app/src/Features/PasswordReset/PasswordResetRouter.js", "repo_id": "overleaf", "token_count": 718 }
545
const { ObjectId } = require('mongodb') const _ = require('lodash') const { promisify } = require('util') const Settings = require('@overleaf/settings') const ENGINE_TO_COMPILER_MAP = { latex_dvipdf: 'latex', pdflatex: 'pdflatex', xelatex: 'xelatex', lualatex: 'lualatex', } module.exports = { compilerFromV1Engine, isArchived, isTrashed, isArchivedOrTrashed, calculateArchivedArray, ensureNameIsUnique, getAllowedImagesForUser, promises: { ensureNameIsUnique: promisify(ensureNameIsUnique), }, } function compilerFromV1Engine(engine) { return ENGINE_TO_COMPILER_MAP[engine] } function isArchived(project, userId) { userId = ObjectId(userId) if (Array.isArray(project.archived)) { return project.archived.some(id => id.equals(userId)) } else { return !!project.archived } } function isTrashed(project, userId) { userId = ObjectId(userId) if (project.trashed) { return project.trashed.some(id => id.equals(userId)) } else { return false } } function isArchivedOrTrashed(project, userId) { return isArchived(project, userId) || isTrashed(project, userId) } function _allCollaborators(project) { return _.unionWith( [project.owner_ref], project.collaberator_refs, project.readOnly_refs, project.tokenAccessReadAndWrite_refs, project.tokenAccessReadOnly_refs, _objectIdEquals ) } function calculateArchivedArray(project, userId, action) { let archived = project.archived userId = ObjectId(userId) if (archived === true) { archived = _allCollaborators(project) } else if (!archived) { archived = [] } if (action === 'ARCHIVE') { archived = _.unionWith(archived, [userId], _objectIdEquals) } else if (action === 'UNARCHIVE') { archived = archived.filter(id => !_objectIdEquals(id, userId)) } else { throw new Error('Unrecognised action') } return archived } function ensureNameIsUnique(nameList, name, suffixes, maxLength, callback) { // create a set of all project names if (suffixes == null) { suffixes = [] } const allNames = new Set(nameList) const isUnique = x => !allNames.has(x) // check if the supplied name is already unique if (isUnique(name)) { return callback(null, name) } // the name already exists, try adding the user-supplied suffixes to generate a unique name for (const suffix of suffixes) { const candidateName = _addSuffixToProjectName(name, suffix, maxLength) if (isUnique(candidateName)) { return callback(null, candidateName) } } // if there are no (more) suffixes, use a numeric one const uniqueName = _addNumericSuffixToProjectName(name, allNames, maxLength) if (uniqueName != null) { callback(null, uniqueName) } else { callback(new Error(`Failed to generate a unique name for: ${name}`)) } } function _objectIdEquals(firstVal, secondVal) { // For use as a comparator for unionWith return firstVal.toString() === secondVal.toString() } function _addSuffixToProjectName(name, suffix, maxLength) { // append the suffix and truncate the project title if needed if (suffix == null) { suffix = '' } const truncatedLength = maxLength - suffix.length return name.substr(0, truncatedLength) + suffix } function _addNumericSuffixToProjectName(name, allProjectNames, maxLength) { const NUMERIC_SUFFIX_MATCH = / \((\d+)\)$/ const suffixedName = function (basename, number) { const suffix = ` (${number})` return basename.substr(0, maxLength - suffix.length) + suffix } const match = name.match(NUMERIC_SUFFIX_MATCH) let basename = name let n = 1 const last = allProjectNames.size + n if (match != null) { basename = name.replace(NUMERIC_SUFFIX_MATCH, '') n = parseInt(match[1]) } const prefixMatcher = new RegExp(`^${basename} \\(\\d+\\)$`) const projectNamesWithSamePrefix = Array.from(allProjectNames).filter(name => prefixMatcher.test(name) ) const nIsLikelyAYear = n > 1000 && projectNamesWithSamePrefix.length < n / 2 if (nIsLikelyAYear) { basename = name n = 1 } while (n <= last) { const candidate = suffixedName(basename, n) if (!allProjectNames.has(candidate)) { return candidate } n += 1 } return null } function getAllowedImagesForUser(sessionUser) { const images = Settings.allowedImageNames || [] if (sessionUser && sessionUser.isAdmin) { return images } else { return images.filter(image => !image.adminOnly) } }
overleaf/web/app/src/Features/Project/ProjectHelper.js/0
{ "file_path": "overleaf/web/app/src/Features/Project/ProjectHelper.js", "repo_id": "overleaf", "token_count": 1605 }
546
const RateLimiter = require('../../infrastructure/RateLimiter') const { promisifyAll } = require('../../util/promises') const ONE_MIN = 60 const ATTEMPT_LIMIT = 10 function processLoginRequest(email, callback) { const opts = { endpointName: 'login', throttle: ATTEMPT_LIMIT, timeInterval: ONE_MIN * 2, subjectName: email, } RateLimiter.addCount(opts, (err, shouldAllow) => callback(err, shouldAllow)) } function recordSuccessfulLogin(email, callback) { if (callback == null) { callback = function () {} } RateLimiter.clearRateLimit('login', email, callback) } const LoginRateLimiter = { processLoginRequest, recordSuccessfulLogin, } LoginRateLimiter.promises = promisifyAll(LoginRateLimiter) module.exports = LoginRateLimiter
overleaf/web/app/src/Features/Security/LoginRateLimiter.js/0
{ "file_path": "overleaf/web/app/src/Features/Security/LoginRateLimiter.js", "repo_id": "overleaf", "token_count": 257 }
547
const Settings = require('@overleaf/settings') const fs = require('fs') const Path = require('path') // The groups.json file encodes the various group plan options we provide, and // is used in the app the render the appropriate dialog in the plans page, and // to generate the appropriate entries in the Settings.plans array. // It is also used by scripts/recurly/sync_recurly.rb, which will make sure // Recurly has a plan configured for all the groups, and that the prices are // up to date with the data in groups.json. const data = fs.readFileSync( Path.join(__dirname, '/../../../templates/plans/groups.json') ) const groups = JSON.parse(data.toString()) const capitalize = string => string.charAt(0).toUpperCase() + string.slice(1) // With group accounts in Recurly, we end up with a lot of plans to manage. // Rather than hand coding them in the settings file, and then needing to keep // that data in sync with the data in groups.json, we can auto generate the // group plan entries and append them to Settings.plans at boot time. This is not // a particularly clean pattern, since it's a little surprising that settings // are modified at boot-time, but I think it's a better option than trying to // keep two sources of data in sync. for (const [usage, planData] of Object.entries(groups)) { for (const [planCode, currencyData] of Object.entries(planData)) { // Gather all possible sizes that are set up in at least one currency const sizes = new Set() for (const priceData of Object.values(currencyData)) { for (const size in priceData) { sizes.add(size) } } // Generate plans in settings for (const size of sizes) { Settings.plans.push({ planCode: `group_${planCode}_${size}_${usage}`, name: `${Settings.appName} ${capitalize( planCode )} - Group Account (${size} licenses) - ${capitalize(usage)}`, hideFromUsers: true, price: groups[usage][planCode].USD[size], annual: true, features: Settings.features[planCode], groupPlan: true, membersLimit: parseInt(size), membersLimitAddOn: 'additional-license', }) } } } module.exports = groups
overleaf/web/app/src/Features/Subscription/GroupPlansData.js/0
{ "file_path": "overleaf/web/app/src/Features/Subscription/GroupPlansData.js", "repo_id": "overleaf", "token_count": 723 }
548
/* eslint-disable max-len, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const TeamInvitesHandler = require('./TeamInvitesHandler') const SessionManager = require('../Authentication/SessionManager') const SubscriptionLocator = require('./SubscriptionLocator') const ErrorController = require('../Errors/ErrorController') const EmailHelper = require('../Helpers/EmailHelper') module.exports = { createInvite(req, res, next) { const teamManagerId = SessionManager.getLoggedInUserId(req.session) const subscription = req.entity const email = EmailHelper.parseEmail(req.body.email) if (email == null) { return res.status(422).json({ error: { code: 'invalid_email', message: req.i18n.translate('invalid_email'), }, }) } return TeamInvitesHandler.createInvite( teamManagerId, subscription, email, function (err, inviteUserData) { if (err != null) { if (err.alreadyInTeam) { return res.status(400).json({ error: { code: 'user_already_added', message: req.i18n.translate('user_already_added'), }, }) } if (err.limitReached) { return res.status(400).json({ error: { code: 'group_full', message: req.i18n.translate('group_full'), }, }) } return next(err) } return res.json({ user: inviteUserData }) } ) }, viewInvite(req, res, next) { const { token } = req.params const userId = SessionManager.getLoggedInUserId(req.session) return TeamInvitesHandler.getInvite( token, function (err, invite, teamSubscription) { if (err != null) { return next(err) } if (!invite) { return ErrorController.notFound(req, res, next) } return SubscriptionLocator.getUsersSubscription( userId, function (err, personalSubscription) { if (err != null) { return next(err) } const hasIndividualRecurlySubscription = personalSubscription != null && personalSubscription.planCode.match(/(free|trial)/) == null && personalSubscription.groupPlan === false && personalSubscription.recurlySubscription_id != null && personalSubscription.recurlySubscription_id !== '' return res.render('subscriptions/team/invite', { inviterName: invite.inviterName, inviteToken: invite.token, hasIndividualRecurlySubscription, appName: settings.appName, expired: req.query.expired, }) } ) } ) }, acceptInvite(req, res, next) { const { token } = req.params const userId = SessionManager.getLoggedInUserId(req.session) return TeamInvitesHandler.acceptInvite( token, userId, function (err, results) { if (err != null) { return next(err) } return res.sendStatus(204) } ) }, revokeInvite(req, res, next) { const subscription = req.entity const email = EmailHelper.parseEmail(req.params.email) const teamManagerId = SessionManager.getLoggedInUserId(req.session) if (email == null) { return res.sendStatus(400) } return TeamInvitesHandler.revokeInvite( teamManagerId, subscription, email, function (err, results) { if (err != null) { return next(err) } return res.sendStatus(204) } ) }, }
overleaf/web/app/src/Features/Subscription/TeamInvitesController.js/0
{ "file_path": "overleaf/web/app/src/Features/Subscription/TeamInvitesController.js", "repo_id": "overleaf", "token_count": 1826 }
549
const UpdateMerger = require('./UpdateMerger') const logger = require('logger-sharelatex') const NotificationsBuilder = require('../Notifications/NotificationsBuilder') const ProjectCreationHandler = require('../Project/ProjectCreationHandler') const ProjectDeleter = require('../Project/ProjectDeleter') const ProjectGetter = require('../Project/ProjectGetter') const ProjectHelper = require('../Project/ProjectHelper') const ProjectRootDocManager = require('../Project/ProjectRootDocManager') const FileTypeManager = require('../Uploads/FileTypeManager') const CooldownManager = require('../Cooldown/CooldownManager') const Errors = require('../Errors/Errors') const Modules = require('../../infrastructure/Modules') const ROOT_DOC_TIMEOUT_LENGTH = 30 * 1000 function newUpdate(userId, projectName, path, updateRequest, source, callback) { getOrCreateProject(userId, projectName, (err, project) => { if (err) { return callback(err) } if (project == null) { return callback() } CooldownManager.isProjectOnCooldown( project._id, (err, projectIsOnCooldown) => { if (err) { return callback(err) } if (projectIsOnCooldown) { return callback( new Errors.TooManyRequestsError('project on cooldown') ) } FileTypeManager.shouldIgnore(path, (err, shouldIgnore) => { if (shouldIgnore) { return callback() } UpdateMerger.mergeUpdate( userId, project._id, path, updateRequest, source, callback ) }) } ) }) } function deleteUpdate(userId, projectName, path, source, callback) { logger.debug({ userId, filePath: path }, 'handling delete update from tpds') ProjectGetter.findUsersProjectsByName( userId, projectName, (err, projects) => { if (err) { return callback(err) } const activeProjects = projects.filter( project => !ProjectHelper.isArchivedOrTrashed(project, userId) ) if (activeProjects.length === 0) { logger.debug( { userId, filePath: path, projectName }, 'project not found from tpds update, ignoring folder or project' ) return callback() } if (projects.length > 1) { // There is more than one project with that name, and one of them is // active (previous condition) return handleDuplicateProjects(userId, projectName, callback) } const project = activeProjects[0] if (path === '/') { logger.debug( { userId, filePath: path, projectName, project_id: project._id }, 'project found for delete update, path is root so marking project as deleted' ) ProjectDeleter.markAsDeletedByExternalSource(project._id, callback) } else { UpdateMerger.deleteUpdate(userId, project._id, path, source, err => { callback(err) }) } } ) } function getOrCreateProject(userId, projectName, callback) { ProjectGetter.findUsersProjectsByName( userId, projectName, (err, projects) => { if (err) { return callback(err) } if (projects.length === 0) { // No project with that name -- active, archived or trashed -- has been // found. Create one. return ProjectCreationHandler.createBlankProject( userId, projectName, (err, project) => { // have a crack at setting the root doc after a while, on creation // we won't have it yet, but should have been sent it it within 30 // seconds setTimeout(() => { ProjectRootDocManager.setRootDocAutomatically(project._id) }, ROOT_DOC_TIMEOUT_LENGTH) callback(err, project) } ) } const activeProjects = projects.filter( project => !ProjectHelper.isArchivedOrTrashed(project, userId) ) if (activeProjects.length === 0) { // All projects with that name are archived or trashed. Ignore. return callback(null, null) } if (projects.length > 1) { // There is more than one project with that name, and one of them is // active (previous condition) return handleDuplicateProjects(userId, projectName, err => { if (err) { return callback(err) } callback(null, null) }) } callback(err, activeProjects[0]) } ) } function handleDuplicateProjects(userId, projectName, callback) { Modules.hooks.fire('removeDropbox', userId, 'duplicate-projects', err => { if (err) { return callback(err) } NotificationsBuilder.dropboxDuplicateProjectNames(userId).create( projectName, callback ) }) } module.exports = { newUpdate, deleteUpdate, }
overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsUpdateHandler.js/0
{ "file_path": "overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsUpdateHandler.js", "repo_id": "overleaf", "token_count": 2021 }
550
const UserHandler = require('./UserHandler') const UserDeleter = require('./UserDeleter') const UserGetter = require('./UserGetter') const { User } = require('../../models/User') const NewsletterManager = require('../Newsletter/NewsletterManager') const UserRegistrationHandler = require('./UserRegistrationHandler') const logger = require('logger-sharelatex') const metrics = require('@overleaf/metrics') const AuthenticationManager = require('../Authentication/AuthenticationManager') const SessionManager = require('../Authentication/SessionManager') const Features = require('../../infrastructure/Features') const UserAuditLogHandler = require('./UserAuditLogHandler') const UserSessionsManager = require('./UserSessionsManager') const UserUpdater = require('./UserUpdater') const Errors = require('../Errors/Errors') const HttpErrorHandler = require('../Errors/HttpErrorHandler') const OError = require('@overleaf/o-error') const EmailHandler = require('../Email/EmailHandler') const UrlHelper = require('../Helpers/UrlHelper') const { promisify } = require('util') const { expressify } = require('../../util/promises') async function _sendSecurityAlertClearedSessions(user) { const emailOptions = { to: user.email, actionDescribed: `active sessions were cleared on your account ${user.email}`, action: 'active sessions cleared', } try { await EmailHandler.promises.sendEmail('securityAlert', emailOptions) } catch (error) { // log error when sending security alert email but do not pass back logger.error( { error, userId: user._id }, 'could not send security alert email when sessions cleared' ) } } function _sendSecurityAlertPasswordChanged(user) { const emailOptions = { to: user.email, actionDescribed: `your password has been changed on your account ${user.email}`, action: 'password changed', } EmailHandler.sendEmail('securityAlert', emailOptions, error => { if (error) { // log error when sending security alert email but do not pass back logger.error( { error, userId: user._id }, 'could not send security alert email when password changed' ) } }) } async function _ensureAffiliation(userId, emailData) { if (emailData.samlProviderId) { await UserUpdater.promises.confirmEmail(userId, emailData.email) } else { await UserUpdater.promises.addAffiliationForNewUser(userId, emailData.email) } } async function changePassword(req, res, next) { metrics.inc('user.password-change') const userId = SessionManager.getLoggedInUserId(req.session) const user = await AuthenticationManager.promises.authenticate( { _id: userId }, req.body.currentPassword ) if (!user) { return HttpErrorHandler.badRequest(req, res, 'Your old password is wrong') } if (req.body.newPassword1 !== req.body.newPassword2) { return HttpErrorHandler.badRequest( req, res, req.i18n.translate('password_change_passwords_do_not_match') ) } try { await AuthenticationManager.promises.setUserPassword( user, req.body.newPassword1 ) } catch (error) { if (error.name === 'InvalidPasswordError') { return HttpErrorHandler.badRequest(req, res, error.message) } else { throw error } } await UserAuditLogHandler.promises.addEntry( user._id, 'update-password', user._id, req.ip ) // no need to wait, errors are logged and not passed back _sendSecurityAlertPasswordChanged(user) await UserSessionsManager.promises.revokeAllUserSessions(user, [ req.sessionID, ]) return res.json({ message: { type: 'success', email: user.email, text: req.i18n.translate('password_change_successful'), }, }) } async function clearSessions(req, res, next) { metrics.inc('user.clear-sessions') const userId = SessionManager.getLoggedInUserId(req.session) const user = await UserGetter.promises.getUser(userId, { email: 1 }) const sessions = await UserSessionsManager.promises.getAllUserSessions(user, [ req.sessionID, ]) await UserAuditLogHandler.promises.addEntry( user._id, 'clear-sessions', user._id, req.ip, { sessions } ) await UserSessionsManager.promises.revokeAllUserSessions(user, [ req.sessionID, ]) await _sendSecurityAlertClearedSessions(user) res.sendStatus(201) } async function ensureAffiliation(user) { if (!Features.hasFeature('affiliations')) { return } const flaggedEmails = user.emails.filter(email => email.affiliationUnchecked) if (flaggedEmails.length === 0) { return } if (flaggedEmails.length > 1) { logger.error( { userId: user._id }, `Unexpected number of flagged emails: ${flaggedEmails.length}` ) } await _ensureAffiliation(user._id, flaggedEmails[0]) } async function ensureAffiliationMiddleware(req, res, next) { let user if (!Features.hasFeature('affiliations') || !req.query.ensureAffiliation) { return next() } const userId = SessionManager.getLoggedInUserId(req.session) try { user = await UserGetter.promises.getUser(userId) } catch (error) { return new Errors.UserNotFoundError({ info: { userId } }) } try { await ensureAffiliation(user) } catch (error) { return next(error) } return next() } const UserController = { clearSessions: expressify(clearSessions), tryDeleteUser(req, res, next) { const userId = SessionManager.getLoggedInUserId(req.session) const { password } = req.body if (password == null || password === '') { logger.err( { userId }, 'no password supplied for attempt to delete account' ) return res.sendStatus(403) } AuthenticationManager.authenticate( { _id: userId }, password, (err, user) => { if (err != null) { OError.tag( err, 'error authenticating during attempt to delete account', { userId, } ) return next(err) } if (!user) { logger.err({ userId }, 'auth failed during attempt to delete account') return res.sendStatus(403) } UserDeleter.deleteUser( userId, { deleterUser: user, ipAddress: req.ip }, err => { if (err) { const errorData = { message: 'error while deleting user account', info: { userId }, } if (err instanceof Errors.SubscriptionAdminDeletionError) { // set info.public.error for JSON response so frontend can display // a specific message errorData.info.public = { error: 'SubscriptionAdminDeletionError', } logger.warn(OError.tag(err, errorData.message, errorData.info)) return HttpErrorHandler.unprocessableEntity( req, res, errorData.message, errorData.info.public ) } else { return next(OError.tag(err, errorData.message, errorData.info)) } } const sessionId = req.sessionID if (typeof req.logout === 'function') { req.logout() } req.session.destroy(err => { if (err != null) { OError.tag(err, 'error destroying session') return next(err) } UserSessionsManager.untrackSession(user, sessionId) res.sendStatus(200) }) } ) } ) }, unsubscribe(req, res, next) { const userId = SessionManager.getLoggedInUserId(req.session) UserGetter.getUser(userId, (err, user) => { if (err != null) { return next(err) } NewsletterManager.unsubscribe(user, err => { if (err != null) { logger.warn( { err, user }, 'Failed to unsubscribe user from newsletter' ) } res.sendStatus(200) }) }) }, updateUserSettings(req, res, next) { const userId = SessionManager.getLoggedInUserId(req.session) User.findById(userId, (err, user) => { if (err != null || user == null) { logger.err({ err, userId }, 'problem updaing user settings') return res.sendStatus(500) } if (req.body.first_name != null) { user.first_name = req.body.first_name.trim() } if (req.body.last_name != null) { user.last_name = req.body.last_name.trim() } if (req.body.role != null) { user.role = req.body.role.trim() } if (req.body.institution != null) { user.institution = req.body.institution.trim() } if (req.body.mode != null) { user.ace.mode = req.body.mode } if (req.body.editorTheme != null) { user.ace.theme = req.body.editorTheme } if (req.body.overallTheme != null) { user.ace.overallTheme = req.body.overallTheme } if (req.body.fontSize != null) { user.ace.fontSize = req.body.fontSize } if (req.body.autoComplete != null) { user.ace.autoComplete = req.body.autoComplete } if (req.body.autoPairDelimiters != null) { user.ace.autoPairDelimiters = req.body.autoPairDelimiters } if (req.body.spellCheckLanguage != null) { user.ace.spellCheckLanguage = req.body.spellCheckLanguage } if (req.body.pdfViewer != null) { user.ace.pdfViewer = req.body.pdfViewer } if (req.body.syntaxValidation != null) { user.ace.syntaxValidation = req.body.syntaxValidation } if (req.body.fontFamily != null) { user.ace.fontFamily = req.body.fontFamily } if (req.body.lineHeight != null) { user.ace.lineHeight = req.body.lineHeight } user.save(err => { if (err != null) { return next(err) } const newEmail = req.body.email != null ? req.body.email.trim().toLowerCase() : undefined if ( newEmail == null || newEmail === user.email || req.externalAuthenticationSystemUsed() ) { // end here, don't update email SessionManager.setInSessionUser(req.session, { first_name: user.first_name, last_name: user.last_name, }) res.sendStatus(200) } else if (newEmail.indexOf('@') === -1) { // email invalid res.sendStatus(400) } else { // update the user email const auditLog = { initiatorId: userId, ipAddress: req.ip, } UserUpdater.changeEmailAddress(userId, newEmail, auditLog, err => { if (err) { if (err instanceof Errors.EmailExistsError) { const translation = req.i18n.translate( 'email_already_registered' ) return HttpErrorHandler.conflict(req, res, translation) } else { return HttpErrorHandler.legacyInternal( req, res, req.i18n.translate('problem_changing_email_address'), OError.tag(err, 'problem_changing_email_address', { userId, newEmail, }) ) } } User.findById(userId, (err, user) => { if (err != null) { logger.err( { err, userId }, 'error getting user for email update' ) return res.sendStatus(500) } SessionManager.setInSessionUser(req.session, { email: user.email, first_name: user.first_name, last_name: user.last_name, }) UserHandler.populateTeamInvites(user, err => { // need to refresh this in the background if (err != null) { logger.err({ err }, 'error populateTeamInvites') } res.sendStatus(200) }) }) }) } }) }) }, doLogout(req, cb) { metrics.inc('user.logout') const user = SessionManager.getSessionUser(req.session) logger.log({ user }, 'logging out') const sessionId = req.sessionID if (typeof req.logout === 'function') { req.logout() } // passport logout req.session.destroy(err => { if (err) { OError.tag(err, 'error destroying session') return cb(err) } if (user != null) { UserSessionsManager.untrackSession(user, sessionId) } cb() }) }, logout(req, res, next) { const requestedRedirect = req.body.redirect ? UrlHelper.getSafeRedirectPath(req.body.redirect) : undefined const redirectUrl = requestedRedirect || '/login' UserController.doLogout(req, err => { if (err != null) { return next(err) } res.redirect(redirectUrl) }) }, expireDeletedUser(req, res, next) { const userId = req.params.userId UserDeleter.expireDeletedUser(userId, error => { if (error) { return next(error) } res.sendStatus(204) }) }, expireDeletedUsersAfterDuration(req, res, next) { UserDeleter.expireDeletedUsersAfterDuration(error => { if (error) { return next(error) } res.sendStatus(204) }) }, register(req, res, next) { const { email } = req.body if (email == null || email === '') { return res.sendStatus(422) // Unprocessable Entity } UserRegistrationHandler.registerNewUserAndSendActivationEmail( email, (error, user, setNewPasswordUrl) => { if (error != null) { return next(error) } res.json({ email: user.email, setNewPasswordUrl, }) } ) }, changePassword: expressify(changePassword), } UserController.promises = { doLogout: promisify(UserController.doLogout), ensureAffiliation, ensureAffiliationMiddleware, } module.exports = UserController
overleaf/web/app/src/Features/User/UserController.js/0
{ "file_path": "overleaf/web/app/src/Features/User/UserController.js", "repo_id": "overleaf", "token_count": 6354 }
551
const UserMembershipAuthorization = { hasStaffAccess(requiredStaffAccess) { return req => { if (!req.user) { return false } if (req.user.isAdmin) { return true } return ( requiredStaffAccess && req.user.staffAccess && req.user.staffAccess[requiredStaffAccess] ) } }, hasEntityAccess() { return req => { if (!req.entity) { return false } return req.entity[req.entityConfig.fields.access].some(accessUserId => accessUserId.equals(req.user._id) ) } }, } module.exports = UserMembershipAuthorization
overleaf/web/app/src/Features/UserMembership/UserMembershipAuthorization.js/0
{ "file_path": "overleaf/web/app/src/Features/UserMembership/UserMembershipAuthorization.js", "repo_id": "overleaf", "token_count": 280 }
552
const request = require('request') const settings = require('@overleaf/settings') const _ = require('underscore') const logger = require('logger-sharelatex') const URL = require('url') const { promisify, promisifyMultiResult } = require('../util/promises') const currencyMappings = { GB: 'GBP', US: 'USD', CH: 'CHF', NZ: 'NZD', AU: 'AUD', DK: 'DKK', NO: 'NOK', CA: 'CAD', SE: 'SEK', } // Countries which would likely prefer Euro's const EuroCountries = [ 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'EE', 'FI', 'FR', 'DE', 'EL', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', ] _.each(EuroCountries, country => (currencyMappings[country] = 'EUR')) function getDetails(ip, callback) { if (!ip) { return callback(new Error('no ip passed')) } ip = ip.trim().split(' ')[0] const opts = { url: URL.resolve(settings.apis.geoIpLookup.url, ip), timeout: 1000, json: true, } logger.log({ ip, opts }, 'getting geo ip details') request.get(opts, function (err, res, ipDetails) { if (err) { logger.warn({ err, ip }, 'error getting ip details') } callback(err, ipDetails) }) } function getCurrencyCode(ip, callback) { getDetails(ip, function (err, ipDetails) { if (err || !ipDetails) { logger.err( { err, ip }, 'problem getting currencyCode for ip, defaulting to USD' ) return callback(null, 'USD') } const countryCode = ipDetails && ipDetails.country_code ? ipDetails.country_code.toUpperCase() : undefined const currencyCode = currencyMappings[countryCode] || 'USD' logger.log({ ip, currencyCode, ipDetails }, 'got currencyCode for ip') callback(err, currencyCode, countryCode) }) } module.exports = { getDetails, getCurrencyCode, promises: { getDetails: promisify(getDetails), getCurrencyCode: promisifyMultiResult(getCurrencyCode, [ 'currencyCode', 'countryCode', ]), }, }
overleaf/web/app/src/infrastructure/GeoIpLookup.js/0
{ "file_path": "overleaf/web/app/src/infrastructure/GeoIpLookup.js", "repo_id": "overleaf", "token_count": 830 }
553
const Path = require('path') const express = require('express') const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const metrics = require('@overleaf/metrics') const expressLocals = require('./ExpressLocals') const Validation = require('./Validation') const csp = require('./CSP') const Router = require('../router') const helmet = require('helmet') const UserSessionsRedis = require('../Features/User/UserSessionsRedis') const Csrf = require('./Csrf') const sessionsRedisClient = UserSessionsRedis.client() const SessionAutostartMiddleware = require('./SessionAutostartMiddleware') const SessionStoreManager = require('./SessionStoreManager') const session = require('express-session') const RedisStore = require('connect-redis')(session) const bodyParser = require('./BodyParserWrapper') const methodOverride = require('method-override') const cookieParser = require('cookie-parser') const bearerToken = require('express-bearer-token') const passport = require('passport') const LocalStrategy = require('passport-local').Strategy const oneDayInMilliseconds = 86400000 const ReferalConnect = require('../Features/Referal/ReferalConnect') const RedirectManager = require('./RedirectManager') const ProxyManager = require('./ProxyManager') const translations = require('./Translations') const Modules = require('./Modules') const Views = require('./Views') const ErrorController = require('../Features/Errors/ErrorController') const HttpErrorHandler = require('../Features/Errors/HttpErrorHandler') const UserSessionsManager = require('../Features/User/UserSessionsManager') const AuthenticationController = require('../Features/Authentication/AuthenticationController') const SessionManager = require('../Features/Authentication/SessionManager') const STATIC_CACHE_AGE = Settings.cacheStaticAssets ? oneDayInMilliseconds * 365 : 0 // Init the session store const sessionStore = new RedisStore({ client: sessionsRedisClient }) const app = express() const webRouter = express.Router() const privateApiRouter = express.Router() const publicApiRouter = express.Router() if (Settings.behindProxy) { app.set('trust proxy', Settings.trustedProxyIps || true) /** * Handle the X-Original-Forwarded-For header. * * The nginx ingress sends us the contents of X-Forwarded-For it received in * X-Original-Forwarded-For. Express expects all proxy IPs to be in a comma * separated list in X-Forwarded-For. */ app.use((req, res, next) => { if ( req.headers['x-original-forwarded-for'] && req.headers['x-forwarded-for'] ) { req.headers['x-forwarded-for'] = req.headers['x-original-forwarded-for'] + ', ' + req.headers['x-forwarded-for'] } next() }) } if (Settings.exposeHostname) { const HOSTNAME = require('os').hostname() app.use((req, res, next) => { res.setHeader('X-Served-By', HOSTNAME) next() }) } webRouter.get( '/serviceWorker.js', express.static(Path.join(__dirname, '/../../../public'), { maxAge: oneDayInMilliseconds, }) ) webRouter.use( express.static(Path.join(__dirname, '/../../../public'), { maxAge: STATIC_CACHE_AGE, }) ) app.set('views', Path.join(__dirname, '/../../views')) app.set('view engine', 'pug') Modules.loadViewIncludes(app) app.use(bodyParser.urlencoded({ extended: true, limit: '2mb' })) app.use(bodyParser.json({ limit: Settings.max_json_request_size })) app.use(methodOverride()) app.use(bearerToken()) app.use(metrics.http.monitor(logger)) RedirectManager.apply(webRouter) ProxyManager.apply(publicApiRouter) webRouter.use(cookieParser(Settings.security.sessionSecret)) SessionAutostartMiddleware.applyInitialMiddleware(webRouter) webRouter.use( session({ resave: false, saveUninitialized: false, secret: Settings.security.sessionSecret, proxy: Settings.behindProxy, cookie: { domain: Settings.cookieDomain, maxAge: Settings.cookieSessionLength, // in milliseconds, see https://github.com/expressjs/session#cookiemaxage secure: Settings.secureCookie, sameSite: Settings.sameSiteCookie, }, store: sessionStore, key: Settings.cookieName, rolling: true, }) ) // patch the session store to generate a validation token for every new session SessionStoreManager.enableValidationToken(sessionStore) // use middleware to reject all requests with invalid tokens webRouter.use(SessionStoreManager.validationMiddleware) // passport webRouter.use(passport.initialize()) webRouter.use(passport.session()) passport.use( new LocalStrategy( { passReqToCallback: true, usernameField: 'email', passwordField: 'password', }, AuthenticationController.doPassportLogin ) ) passport.serializeUser(AuthenticationController.serializeUser) passport.deserializeUser(AuthenticationController.deserializeUser) Modules.hooks.fire('passportSetup', passport, function (err) { if (err != null) { logger.err({ err }, 'error setting up passport in modules') } }) Modules.applyNonCsrfRouter(webRouter, privateApiRouter, publicApiRouter) webRouter.csrf = new Csrf() webRouter.use(webRouter.csrf.middleware) webRouter.use(translations.i18nMiddleware) webRouter.use(translations.setLangBasedOnDomainMiddleware) // Measure expiry from last request, not last login webRouter.use(function (req, res, next) { if (!req.session.noSessionCallback) { req.session.touch() if (SessionManager.isUserLoggedIn(req.session)) { UserSessionsManager.touch( SessionManager.getSessionUser(req.session), err => { if (err) { logger.err({ err }, 'error extending user session') } } ) } } next() }) webRouter.use(ReferalConnect.use) expressLocals(webRouter, privateApiRouter, publicApiRouter) webRouter.use(SessionAutostartMiddleware.invokeCallbackMiddleware) webRouter.use(function (req, res, next) { if (Settings.siteIsOpen) { next() } else if ( SessionManager.getSessionUser(req.session) && SessionManager.getSessionUser(req.session).isAdmin ) { next() } else { HttpErrorHandler.maintenance(req, res) } }) webRouter.use(function (req, res, next) { if (Settings.editorIsOpen) { next() } else if (req.url.indexOf('/admin') === 0) { next() } else { HttpErrorHandler.maintenance(req, res) } }) webRouter.use(AuthenticationController.validateAdmin) // add security headers using Helmet const noCacheMiddleware = require('nocache')() webRouter.use(function (req, res, next) { const isLoggedIn = SessionManager.isUserLoggedIn(req.session) const isProjectPage = !!req.path.match('^/project/[a-f0-9]{24}$') if (isLoggedIn || isProjectPage) { noCacheMiddleware(req, res, next) } else { next() } }) webRouter.use( helmet({ // note that more headers are added by default dnsPrefetchControl: false, referrerPolicy: { policy: 'origin-when-cross-origin' }, hsts: false, }) ) // add CSP header to HTML-rendering routes, if enabled if (Settings.csp && Settings.csp.enabled) { logger.info('adding CSP header to rendered routes', Settings.csp) webRouter.use(csp(Settings.csp)) } logger.info('creating HTTP server'.yellow) const server = require('http').createServer(app) // provide settings for separate web and api processes if (Settings.enabledServices.includes('api')) { logger.info('providing api router') app.use(privateApiRouter) app.use(Validation.errorMiddleware) app.use(ErrorController.handleApiError) } if (Settings.enabledServices.includes('web')) { logger.info('providing web router') if (Settings.precompilePugTemplatesAtBootTime) { logger.info('precompiling views for web in production environment') Views.precompileViews(app) } if (app.get('env') === 'test') { logger.info('enabling view cache for acceptance tests') app.enable('view cache') } app.use(publicApiRouter) // public API goes with web router for public access app.use(Validation.errorMiddleware) app.use(ErrorController.handleApiError) app.use(webRouter) app.use(Validation.errorMiddleware) app.use(ErrorController.handleError) } metrics.injectMetricsRoute(webRouter) metrics.injectMetricsRoute(privateApiRouter) Router.initialize(webRouter, privateApiRouter, publicApiRouter) module.exports = { app, server, }
overleaf/web/app/src/infrastructure/Server.js/0
{ "file_path": "overleaf/web/app/src/infrastructure/Server.js", "repo_id": "overleaf", "token_count": 2850 }
554
const mongoose = require('../infrastructure/Mongoose') const { Schema } = mongoose const { ObjectId } = Schema const settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const request = require('request') const InstitutionSchema = new Schema({ v1Id: { type: Number, required: true }, managerIds: [{ type: ObjectId, ref: 'User' }], metricsEmail: { optedOutUserIds: [{ type: ObjectId, ref: 'User' }], lastSent: { type: Date }, }, }) // fetch institution's data from v1 API. Errors are ignored InstitutionSchema.method('fetchV1Data', function (callback) { const url = `${settings.apis.v1.url}/universities/list/${this.v1Id}` request.get(url, (error, response, body) => { let parsedBody try { parsedBody = JSON.parse(body) } catch (error1) { // log error and carry on without v1 data error = error1 logger.err( { model: 'Institution', v1Id: this.v1Id, error }, '[fetchV1DataError]' ) } this.name = parsedBody != null ? parsedBody.name : undefined this.countryCode = parsedBody != null ? parsedBody.country_code : undefined this.departments = parsedBody != null ? parsedBody.departments : undefined this.portalSlug = parsedBody != null ? parsedBody.portal_slug : undefined callback(null, this) }) }) exports.Institution = mongoose.model('Institution', InstitutionSchema) exports.InstitutionSchema = InstitutionSchema
overleaf/web/app/src/models/Institution.js/0
{ "file_path": "overleaf/web/app/src/models/Institution.js", "repo_id": "overleaf", "token_count": 510 }
555
const AdminController = require('./Features/ServerAdmin/AdminController') const ErrorController = require('./Features/Errors/ErrorController') const ProjectController = require('./Features/Project/ProjectController') const ProjectApiController = require('./Features/Project/ProjectApiController') const SpellingController = require('./Features/Spelling/SpellingController') const EditorRouter = require('./Features/Editor/EditorRouter') const Settings = require('@overleaf/settings') const TpdsController = require('./Features/ThirdPartyDataStore/TpdsController') const SubscriptionRouter = require('./Features/Subscription/SubscriptionRouter') const UploadsRouter = require('./Features/Uploads/UploadsRouter') const metrics = require('@overleaf/metrics') const ReferalController = require('./Features/Referal/ReferalController') const AuthenticationController = require('./Features/Authentication/AuthenticationController') const SessionManager = require('./Features/Authentication/SessionManager') const TagsController = require('./Features/Tags/TagsController') const NotificationsController = require('./Features/Notifications/NotificationsController') const CollaboratorsRouter = require('./Features/Collaborators/CollaboratorsRouter') const UserInfoController = require('./Features/User/UserInfoController') const UserController = require('./Features/User/UserController') const UserEmailsController = require('./Features/User/UserEmailsController') const UserPagesController = require('./Features/User/UserPagesController') const DocumentController = require('./Features/Documents/DocumentController') const CompileManager = require('./Features/Compile/CompileManager') const CompileController = require('./Features/Compile/CompileController') const ClsiCookieManager = require('./Features/Compile/ClsiCookieManager')( Settings.apis.clsi != null ? Settings.apis.clsi.backendGroupName : undefined ) const HealthCheckController = require('./Features/HealthCheck/HealthCheckController') const ProjectDownloadsController = require('./Features/Downloads/ProjectDownloadsController') const FileStoreController = require('./Features/FileStore/FileStoreController') const HistoryController = require('./Features/History/HistoryController') const ExportsController = require('./Features/Exports/ExportsController') const PasswordResetRouter = require('./Features/PasswordReset/PasswordResetRouter') const StaticPagesRouter = require('./Features/StaticPages/StaticPagesRouter') const ChatController = require('./Features/Chat/ChatController') const Modules = require('./infrastructure/Modules') const RateLimiterMiddleware = require('./Features/Security/RateLimiterMiddleware') const InactiveProjectController = require('./Features/InactiveData/InactiveProjectController') const ContactRouter = require('./Features/Contacts/ContactRouter') const ReferencesController = require('./Features/References/ReferencesController') const AuthorizationMiddleware = require('./Features/Authorization/AuthorizationMiddleware') const BetaProgramController = require('./Features/BetaProgram/BetaProgramController') const AnalyticsRouter = require('./Features/Analytics/AnalyticsRouter') const MetaController = require('./Features/Metadata/MetaController') const TokenAccessController = require('./Features/TokenAccess/TokenAccessController') const Features = require('./infrastructure/Features') const LinkedFilesRouter = require('./Features/LinkedFiles/LinkedFilesRouter') const TemplatesRouter = require('./Features/Templates/TemplatesRouter') const InstitutionsController = require('./Features/Institutions/InstitutionsController') const UserMembershipRouter = require('./Features/UserMembership/UserMembershipRouter') const SystemMessageController = require('./Features/SystemMessages/SystemMessageController') const AnalyticsRegistrationSourceMiddleware = require('./Features/Analytics/AnalyticsRegistrationSourceMiddleware') const { Joi, validate } = require('./infrastructure/Validation') const { renderUnsupportedBrowserPage, unsupportedBrowserMiddleware, } = require('./infrastructure/UnsupportedBrowserMiddleware') const logger = require('logger-sharelatex') const _ = require('underscore') module.exports = { initialize } function initialize(webRouter, privateApiRouter, publicApiRouter) { if (!Settings.allowPublicAccess) { webRouter.all('*', AuthenticationController.requireGlobalLogin) } webRouter.get('*', AnalyticsRegistrationSourceMiddleware.setInbound()) webRouter.get('/login', UserPagesController.loginPage) AuthenticationController.addEndpointToLoginWhitelist('/login') webRouter.post('/login', AuthenticationController.passportLogin) if (Settings.enableLegacyLogin) { AuthenticationController.addEndpointToLoginWhitelist('/login/legacy') webRouter.get('/login/legacy', UserPagesController.loginPage) webRouter.post('/login/legacy', AuthenticationController.passportLogin) } webRouter.get( '/read-only/one-time-login', UserPagesController.oneTimeLoginPage ) AuthenticationController.addEndpointToLoginWhitelist( '/read-only/one-time-login' ) webRouter.get('/logout', UserPagesController.logoutPage) webRouter.post('/logout', UserController.logout) webRouter.get('/restricted', AuthorizationMiddleware.restricted) if (Features.hasFeature('registration-page')) { webRouter.get('/register', UserPagesController.registerPage) AuthenticationController.addEndpointToLoginWhitelist('/register') } EditorRouter.apply(webRouter, privateApiRouter) CollaboratorsRouter.apply(webRouter, privateApiRouter) SubscriptionRouter.apply(webRouter, privateApiRouter, publicApiRouter) UploadsRouter.apply(webRouter, privateApiRouter) PasswordResetRouter.apply(webRouter, privateApiRouter) StaticPagesRouter.apply(webRouter, privateApiRouter) ContactRouter.apply(webRouter, privateApiRouter) AnalyticsRouter.apply(webRouter, privateApiRouter, publicApiRouter) LinkedFilesRouter.apply(webRouter, privateApiRouter, publicApiRouter) TemplatesRouter.apply(webRouter) UserMembershipRouter.apply(webRouter) Modules.applyRouter(webRouter, privateApiRouter, publicApiRouter) if (Settings.enableSubscriptions) { webRouter.get( '/user/bonus', AuthenticationController.requireLogin(), ReferalController.bonus ) } // .getMessages will generate an empty response for anonymous users. webRouter.get('/system/messages', SystemMessageController.getMessages) webRouter.get( '/user/settings', AuthenticationController.requireLogin(), UserPagesController.settingsPage ) webRouter.post( '/user/settings', AuthenticationController.requireLogin(), UserController.updateUserSettings ) webRouter.post( '/user/password/update', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'change-password', maxRequests: 10, timeInterval: 60, }), UserController.changePassword ) webRouter.get( '/user/emails', AuthenticationController.requireLogin(), UserController.promises.ensureAffiliationMiddleware, UserEmailsController.list ) webRouter.get('/user/emails/confirm', UserEmailsController.showConfirm) webRouter.post( '/user/emails/confirm', RateLimiterMiddleware.rateLimit({ endpointName: 'confirm-email', maxRequests: 10, timeInterval: 60, }), UserEmailsController.confirm ) webRouter.post( '/user/emails/resend_confirmation', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'resend-confirmation', maxRequests: 10, timeInterval: 60, }), UserEmailsController.resendConfirmation ) if (Features.hasFeature('affiliations')) { webRouter.post( '/user/emails', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'add-email', maxRequests: 10, timeInterval: 60, }), UserEmailsController.add ) webRouter.post( '/user/emails/delete', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'delete-email', maxRequests: 10, timeInterval: 60, }), UserEmailsController.remove ) webRouter.post( '/user/emails/default', AuthenticationController.requireLogin(), UserEmailsController.setDefault ) webRouter.post( '/user/emails/endorse', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'endorse-email', maxRequests: 30, timeInterval: 60, }), UserEmailsController.endorse ) } webRouter.get( '/user/sessions', AuthenticationController.requireLogin(), UserPagesController.sessionsPage ) webRouter.post( '/user/sessions/clear', AuthenticationController.requireLogin(), UserController.clearSessions ) webRouter.delete( '/user/newsletter/unsubscribe', AuthenticationController.requireLogin(), UserController.unsubscribe ) webRouter.post( '/user/delete', RateLimiterMiddleware.rateLimit({ endpointName: 'delete-user', maxRequests: 10, timeInterval: 60, }), AuthenticationController.requireLogin(), UserController.tryDeleteUser ) webRouter.get( '/user/personal_info', AuthenticationController.requireLogin(), UserInfoController.getLoggedInUsersPersonalInfo ) privateApiRouter.get( '/user/:user_id/personal_info', AuthenticationController.requirePrivateApiAuth(), UserInfoController.getPersonalInfo ) webRouter.get( '/user/reconfirm', UserPagesController.renderReconfirmAccountPage ) // for /user/reconfirm POST, see password router webRouter.get( '/user/tpds/queues', AuthenticationController.requireLogin(), TpdsController.getQueues ) webRouter.get( '/user/projects', AuthenticationController.requireLogin(), ProjectController.userProjectsJson ) webRouter.get( '/project/:Project_id/entities', AuthenticationController.requireLogin(), AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.projectEntitiesJson ) webRouter.get( '/project', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'open-dashboard', maxRequests: 30, timeInterval: 60, }), unsupportedBrowserMiddleware, ProjectController.projectListPage ) webRouter.post( '/project/new', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'create-project', maxRequests: 20, timeInterval: 60, }), ProjectController.newProject ) webRouter.get( '/Project/:Project_id', RateLimiterMiddleware.rateLimit({ endpointName: 'open-project', params: ['Project_id'], maxRequests: 15, timeInterval: 60, }), unsupportedBrowserMiddleware, AuthenticationController.validateUserSession(), AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.loadEditor ) webRouter.head( '/Project/:Project_id/file/:File_id', AuthorizationMiddleware.ensureUserCanReadProject, FileStoreController.getFileHead ) webRouter.get( '/Project/:Project_id/file/:File_id', AuthorizationMiddleware.ensureUserCanReadProject, FileStoreController.getFile ) webRouter.post( '/project/:Project_id/settings', AuthorizationMiddleware.ensureUserCanWriteProjectSettings, ProjectController.updateProjectSettings ) webRouter.post( '/project/:Project_id/settings/admin', AuthenticationController.requireLogin(), AuthorizationMiddleware.ensureUserCanAdminProject, ProjectController.updateProjectAdminSettings ) webRouter.post( '/project/:Project_id/compile', RateLimiterMiddleware.rateLimit({ endpointName: 'compile-project-http', params: ['Project_id'], maxRequests: 800, timeInterval: 60 * 60, }), AuthorizationMiddleware.ensureUserCanReadProject, CompileController.compile ) webRouter.post( '/project/:Project_id/compile/stop', AuthorizationMiddleware.ensureUserCanReadProject, CompileController.stopCompile ) // LEGACY: Used by the web download buttons, adds filename header, TODO: remove at some future date webRouter.get( '/project/:Project_id/output/output.pdf', AuthorizationMiddleware.ensureUserCanReadProject, CompileController.downloadPdf ) // PDF Download button webRouter.get( /^\/download\/project\/([^/]*)\/output\/output\.pdf$/, function (req, res, next) { const params = { Project_id: req.params[0] } req.params = params next() }, AuthorizationMiddleware.ensureUserCanReadProject, CompileController.downloadPdf ) // PDF Download button for specific build webRouter.get( /^\/download\/project\/([^/]*)\/build\/([0-9a-f-]+)\/output\/output\.pdf$/, function (req, res, next) { const params = { Project_id: req.params[0], build_id: req.params[1], } req.params = params next() }, AuthorizationMiddleware.ensureUserCanReadProject, CompileController.downloadPdf ) // Align with limits defined in CompileController.downloadPdf const rateLimiterMiddlewareOutputFiles = RateLimiterMiddleware.rateLimit({ endpointName: 'misc-output-download', params: ['Project_id'], maxRequests: 1000, timeInterval: 60 * 60, }) // Used by the pdf viewers webRouter.get( /^\/project\/([^/]*)\/output\/(.*)$/, function (req, res, next) { const params = { Project_id: req.params[0], file: req.params[1], } req.params = params next() }, rateLimiterMiddlewareOutputFiles, AuthorizationMiddleware.ensureUserCanReadProject, CompileController.getFileFromClsi ) // direct url access to output files for a specific build (query string not required) webRouter.get( /^\/project\/([^/]*)\/build\/([0-9a-f-]+)\/output\/(.*)$/, function (req, res, next) { const params = { Project_id: req.params[0], build_id: req.params[1], file: req.params[2], } req.params = params next() }, rateLimiterMiddlewareOutputFiles, AuthorizationMiddleware.ensureUserCanReadProject, CompileController.getFileFromClsi ) // direct url access to output files for user but no build, to retrieve files when build fails webRouter.get( /^\/project\/([^/]*)\/user\/([0-9a-f-]+)\/output\/(.*)$/, function (req, res, next) { const params = { Project_id: req.params[0], user_id: req.params[1], file: req.params[2], } req.params = params next() }, rateLimiterMiddlewareOutputFiles, AuthorizationMiddleware.ensureUserCanReadProject, CompileController.getFileFromClsi ) // direct url access to output files for a specific user and build (query string not required) webRouter.get( /^\/project\/([^/]*)\/user\/([0-9a-f]+)\/build\/([0-9a-f-]+)\/output\/(.*)$/, function (req, res, next) { const params = { Project_id: req.params[0], user_id: req.params[1], build_id: req.params[2], file: req.params[3], } req.params = params next() }, rateLimiterMiddlewareOutputFiles, AuthorizationMiddleware.ensureUserCanReadProject, CompileController.getFileFromClsi ) webRouter.delete( '/project/:Project_id/output', validate({ query: { clsiserverid: Joi.string() } }), AuthorizationMiddleware.ensureUserCanReadProject, CompileController.deleteAuxFiles ) webRouter.get( '/project/:Project_id/sync/code', AuthorizationMiddleware.ensureUserCanReadProject, CompileController.proxySyncCode ) webRouter.get( '/project/:Project_id/sync/pdf', AuthorizationMiddleware.ensureUserCanReadProject, CompileController.proxySyncPdf ) webRouter.get( '/project/:Project_id/wordcount', validate({ query: { clsiserverid: Joi.string() } }), AuthorizationMiddleware.ensureUserCanReadProject, CompileController.wordCount ) webRouter.post( '/Project/:Project_id/archive', AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.archiveProject ) webRouter.delete( '/Project/:Project_id/archive', AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.unarchiveProject ) webRouter.post( '/project/:project_id/trash', AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.trashProject ) webRouter.delete( '/project/:project_id/trash', AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.untrashProject ) webRouter.delete( '/Project/:Project_id', AuthenticationController.requireLogin(), AuthorizationMiddleware.ensureUserCanAdminProject, ProjectController.deleteProject ) webRouter.post( '/Project/:Project_id/restore', AuthenticationController.requireLogin(), AuthorizationMiddleware.ensureUserCanAdminProject, ProjectController.restoreProject ) webRouter.post( '/Project/:Project_id/clone', AuthorizationMiddleware.ensureUserCanReadProject, ProjectController.cloneProject ) webRouter.post( '/project/:Project_id/rename', AuthenticationController.requireLogin(), AuthorizationMiddleware.ensureUserCanAdminProject, ProjectController.renameProject ) webRouter.get( '/project/:Project_id/updates', AuthorizationMiddleware.ensureUserCanReadProject, HistoryController.selectHistoryApi, HistoryController.proxyToHistoryApiAndInjectUserDetails ) webRouter.get( '/project/:Project_id/doc/:doc_id/diff', AuthorizationMiddleware.ensureUserCanReadProject, HistoryController.selectHistoryApi, HistoryController.proxyToHistoryApi ) webRouter.get( '/project/:Project_id/diff', AuthorizationMiddleware.ensureUserCanReadProject, HistoryController.selectHistoryApi, HistoryController.proxyToHistoryApiAndInjectUserDetails ) webRouter.get( '/project/:Project_id/filetree/diff', AuthorizationMiddleware.ensureUserCanReadProject, HistoryController.selectHistoryApi, HistoryController.proxyToHistoryApi ) webRouter.post( '/project/:Project_id/doc/:doc_id/version/:version_id/restore', AuthorizationMiddleware.ensureUserCanWriteProjectContent, HistoryController.selectHistoryApi, HistoryController.proxyToHistoryApi ) webRouter.post( '/project/:project_id/doc/:doc_id/restore', AuthorizationMiddleware.ensureUserCanWriteProjectContent, HistoryController.restoreDocFromDeletedDoc ) webRouter.post( '/project/:project_id/restore_file', AuthorizationMiddleware.ensureUserCanWriteProjectContent, HistoryController.restoreFileFromV2 ) webRouter.get( '/project/:project_id/version/:version/zip', RateLimiterMiddleware.rateLimit({ endpointName: 'download-project-revision', maxRequests: 30, timeInterval: 60 * 60, }), AuthorizationMiddleware.ensureUserCanReadProject, HistoryController.downloadZipOfVersion ) privateApiRouter.post( '/project/:Project_id/history/resync', AuthenticationController.requirePrivateApiAuth(), HistoryController.resyncProjectHistory ) webRouter.get( '/project/:Project_id/labels', AuthorizationMiddleware.ensureUserCanReadProject, HistoryController.selectHistoryApi, HistoryController.ensureProjectHistoryEnabled, HistoryController.getLabels ) webRouter.post( '/project/:Project_id/labels', AuthorizationMiddleware.ensureUserCanWriteProjectContent, HistoryController.selectHistoryApi, HistoryController.ensureProjectHistoryEnabled, HistoryController.createLabel ) webRouter.delete( '/project/:Project_id/labels/:label_id', AuthorizationMiddleware.ensureUserCanWriteProjectContent, HistoryController.selectHistoryApi, HistoryController.ensureProjectHistoryEnabled, HistoryController.deleteLabel ) webRouter.post( '/project/:project_id/export/:brand_variation_id', AuthorizationMiddleware.ensureUserCanWriteProjectContent, ExportsController.exportProject ) webRouter.get( '/project/:project_id/export/:export_id', AuthorizationMiddleware.ensureUserCanWriteProjectContent, ExportsController.exportStatus ) webRouter.get( '/project/:project_id/export/:export_id/:type', AuthorizationMiddleware.ensureUserCanWriteProjectContent, ExportsController.exportDownload ) webRouter.get( '/Project/:Project_id/download/zip', AuthorizationMiddleware.ensureUserCanReadProject, ProjectDownloadsController.downloadProject ) webRouter.get( '/project/download/zip', AuthorizationMiddleware.ensureUserCanReadMultipleProjects, ProjectDownloadsController.downloadMultipleProjects ) webRouter.get( '/project/:project_id/metadata', AuthorizationMiddleware.ensureUserCanReadProject, Settings.allowAnonymousReadAndWriteSharing ? (req, res, next) => { next() } : AuthenticationController.requireLogin(), MetaController.getMetadata ) webRouter.post( '/project/:project_id/doc/:doc_id/metadata', AuthorizationMiddleware.ensureUserCanReadProject, Settings.allowAnonymousReadAndWriteSharing ? (req, res, next) => { next() } : AuthenticationController.requireLogin(), MetaController.broadcastMetadataForDoc ) privateApiRouter.post( '/internal/expire-deleted-projects-after-duration', AuthenticationController.requirePrivateApiAuth(), ProjectController.expireDeletedProjectsAfterDuration ) privateApiRouter.post( '/internal/expire-deleted-users-after-duration', AuthenticationController.requirePrivateApiAuth(), UserController.expireDeletedUsersAfterDuration ) privateApiRouter.post( '/internal/project/:projectId/expire-deleted-project', AuthenticationController.requirePrivateApiAuth(), ProjectController.expireDeletedProject ) privateApiRouter.post( '/internal/users/:userId/expire', AuthenticationController.requirePrivateApiAuth(), UserController.expireDeletedUser ) privateApiRouter.get( '/user/:userId/tag', AuthenticationController.requirePrivateApiAuth(), TagsController.apiGetAllTags ) webRouter.get( '/tag', AuthenticationController.requireLogin(), TagsController.getAllTags ) webRouter.post( '/tag', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'create-tag', maxRequests: 30, timeInterval: 60, }), TagsController.createTag ) webRouter.post( '/tag/:tagId/rename', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'rename-tag', maxRequests: 30, timeInterval: 60, }), TagsController.renameTag ) webRouter.delete( '/tag/:tagId', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'delete-tag', maxRequests: 30, timeInterval: 60, }), TagsController.deleteTag ) webRouter.post( '/tag/:tagId/project/:projectId', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'add-project-to-tag', maxRequests: 30, timeInterval: 60, }), TagsController.addProjectToTag ) webRouter.delete( '/tag/:tagId/project/:projectId', AuthenticationController.requireLogin(), RateLimiterMiddleware.rateLimit({ endpointName: 'remove-project-from-tag', maxRequests: 30, timeInterval: 60, }), TagsController.removeProjectFromTag ) webRouter.get( '/notifications', AuthenticationController.requireLogin(), NotificationsController.getAllUnreadNotifications ) webRouter.delete( '/notifications/:notificationId', AuthenticationController.requireLogin(), NotificationsController.markNotificationAsRead ) // Deprecated in favour of /internal/project/:project_id but still used by versioning privateApiRouter.get( '/project/:project_id/details', AuthenticationController.requirePrivateApiAuth(), ProjectApiController.getProjectDetails ) // New 'stable' /internal API end points privateApiRouter.get( '/internal/project/:project_id', AuthenticationController.requirePrivateApiAuth(), ProjectApiController.getProjectDetails ) privateApiRouter.get( '/internal/project/:Project_id/zip', AuthenticationController.requirePrivateApiAuth(), ProjectDownloadsController.downloadProject ) privateApiRouter.get( '/internal/project/:project_id/compile/pdf', AuthenticationController.requirePrivateApiAuth(), CompileController.compileAndDownloadPdf ) privateApiRouter.post( '/internal/deactivateOldProjects', AuthenticationController.requirePrivateApiAuth(), InactiveProjectController.deactivateOldProjects ) privateApiRouter.post( '/internal/project/:project_id/deactivate', AuthenticationController.requirePrivateApiAuth(), InactiveProjectController.deactivateProject ) privateApiRouter.get( /^\/internal\/project\/([^/]*)\/output\/(.*)$/, function (req, res, next) { const params = { Project_id: req.params[0], file: req.params[1], } req.params = params next() }, AuthenticationController.requirePrivateApiAuth(), CompileController.getFileFromClsi ) privateApiRouter.get( '/project/:Project_id/doc/:doc_id', AuthenticationController.requirePrivateApiAuth(), DocumentController.getDocument ) privateApiRouter.post( '/project/:Project_id/doc/:doc_id', AuthenticationController.requirePrivateApiAuth(), DocumentController.setDocument ) privateApiRouter.post( '/user/:user_id/update/*', AuthenticationController.requirePrivateApiAuth(), TpdsController.mergeUpdate ) privateApiRouter.delete( '/user/:user_id/update/*', AuthenticationController.requirePrivateApiAuth(), TpdsController.deleteUpdate ) privateApiRouter.post( '/project/:project_id/contents/*', AuthenticationController.requirePrivateApiAuth(), TpdsController.updateProjectContents ) privateApiRouter.delete( '/project/:project_id/contents/*', AuthenticationController.requirePrivateApiAuth(), TpdsController.deleteProjectContents ) webRouter.post( '/spelling/check', AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi ) webRouter.post( '/spelling/learn', AuthenticationController.requireLogin(), SpellingController.proxyRequestToSpellingApi ) webRouter.get( '/project/:project_id/messages', AuthorizationMiddleware.blockRestrictedUserFromProject, AuthorizationMiddleware.ensureUserCanReadProject, ChatController.getMessages ) webRouter.post( '/project/:project_id/messages', AuthorizationMiddleware.blockRestrictedUserFromProject, AuthorizationMiddleware.ensureUserCanReadProject, RateLimiterMiddleware.rateLimit({ endpointName: 'send-chat-message', maxRequests: 100, timeInterval: 60, }), ChatController.sendMessage ) webRouter.post( '/project/:Project_id/references/index', AuthorizationMiddleware.ensureUserCanReadProject, RateLimiterMiddleware.rateLimit({ endpointName: 'index-project-references', maxRequests: 30, timeInterval: 60, }), ReferencesController.index ) webRouter.post( '/project/:Project_id/references/indexAll', AuthorizationMiddleware.ensureUserCanReadProject, RateLimiterMiddleware.rateLimit({ endpointName: 'index-all-project-references', maxRequests: 30, timeInterval: 60, }), ReferencesController.indexAll ) // disable beta program while v2 is in beta webRouter.get( '/beta/participate', AuthenticationController.requireLogin(), BetaProgramController.optInPage ) webRouter.post( '/beta/opt-in', AuthenticationController.requireLogin(), BetaProgramController.optIn ) webRouter.post( '/beta/opt-out', AuthenticationController.requireLogin(), BetaProgramController.optOut ) // New "api" endpoints. Started as a way for v1 to call over to v2 (for // long-term features, as opposed to the nominally temporary ones in the // overleaf-integration module), but may expand beyond that role. publicApiRouter.post( '/api/clsi/compile/:submission_id', AuthenticationController.requirePrivateApiAuth(), CompileController.compileSubmission ) publicApiRouter.get( /^\/api\/clsi\/compile\/([^/]*)\/build\/([0-9a-f-]+)\/output\/(.*)$/, function (req, res, next) { const params = { submission_id: req.params[0], build_id: req.params[1], file: req.params[2], } req.params = params next() }, AuthenticationController.requirePrivateApiAuth(), CompileController.getFileFromClsiWithoutUser ) publicApiRouter.post( '/api/institutions/confirm_university_domain', RateLimiterMiddleware.rateLimit({ endpointName: 'confirm-university-domain', maxRequests: 1, timeInterval: 60, }), AuthenticationController.requirePrivateApiAuth(), InstitutionsController.confirmDomain ) webRouter.get('/chrome', function (req, res, next) { // Match v1 behaviour - this is used for a Chrome web app if (SessionManager.isUserLoggedIn(req.session)) { res.redirect('/project') } else { res.redirect('/register') } }) // Admin Stuff webRouter.get( '/admin', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.index ) webRouter.get( '/admin/user', AuthorizationMiddleware.ensureUserIsSiteAdmin, (req, res) => res.redirect('/admin/register') ) // this gets removed by admin-panel addon webRouter.get( '/admin/register', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.registerNewUser ) webRouter.post( '/admin/register', AuthorizationMiddleware.ensureUserIsSiteAdmin, UserController.register ) if (!Features.hasFeature('saas')) { webRouter.post( '/admin/openEditor', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.openEditor ) webRouter.post( '/admin/closeEditor', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.closeEditor ) webRouter.post( '/admin/disconnectAllUsers', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.disconnectAllUsers ) } webRouter.post( '/admin/flushProjectToTpds', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.flushProjectToTpds ) webRouter.post( '/admin/pollDropboxForUser', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.pollDropboxForUser ) webRouter.post( '/admin/messages', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.createMessage ) webRouter.post( '/admin/messages/clear', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.clearMessages ) webRouter.post( '/admin/unregisterServiceWorker', AuthorizationMiddleware.ensureUserIsSiteAdmin, AdminController.unregisterServiceWorker ) privateApiRouter.post( '/disconnectAllUsers', AdminController.disconnectAllUsers ) privateApiRouter.get('/perfTest', (req, res) => res.send('hello')) publicApiRouter.get('/status', (req, res) => { if (!Settings.siteIsOpen) { res.send('web site is closed (web)') } else if (!Settings.editorIsOpen) { res.send('web editor is closed (web)') } else { res.send('web sharelatex is alive (web)') } }) privateApiRouter.get('/status', (req, res) => res.send('web sharelatex is alive (api)') ) // used by kubernetes health-check and acceptance tests webRouter.get('/dev/csrf', (req, res) => res.send(res.locals.csrfToken)) publicApiRouter.get( '/health_check', HealthCheckController.checkActiveHandles, HealthCheckController.check ) privateApiRouter.get( '/health_check', HealthCheckController.checkActiveHandles, HealthCheckController.checkApi ) publicApiRouter.get( '/health_check/api', HealthCheckController.checkActiveHandles, HealthCheckController.checkApi ) privateApiRouter.get( '/health_check/api', HealthCheckController.checkActiveHandles, HealthCheckController.checkApi ) publicApiRouter.get( '/health_check/full', HealthCheckController.checkActiveHandles, HealthCheckController.check ) privateApiRouter.get( '/health_check/full', HealthCheckController.checkActiveHandles, HealthCheckController.check ) publicApiRouter.get('/health_check/redis', HealthCheckController.checkRedis) privateApiRouter.get('/health_check/redis', HealthCheckController.checkRedis) publicApiRouter.get('/health_check/mongo', HealthCheckController.checkMongo) privateApiRouter.get('/health_check/mongo', HealthCheckController.checkMongo) webRouter.get( '/status/compiler/:Project_id', RateLimiterMiddleware.rateLimit({ endpointName: 'status-compiler', maxRequests: 10, timeInterval: 60, }), AuthorizationMiddleware.ensureUserCanReadProject, function (req, res) { const projectId = req.params.Project_id const sendRes = _.once(function (statusCode, message) { res.status(statusCode) res.send(message) ClsiCookieManager.clearServerId(projectId) }) // force every compile to a new server // set a timeout var handler = setTimeout(function () { sendRes(500, 'Compiler timed out') handler = null }, 10000) // use a valid user id for testing const testUserId = '123456789012345678901234' // run the compile CompileManager.compile( projectId, testUserId, {}, function (error, status) { if (handler) { clearTimeout(handler) } if (error) { sendRes(500, `Compiler returned error ${error.message}`) } else if (status === 'success') { sendRes(200, 'Compiler returned in less than 10 seconds') } else { sendRes(500, `Compiler returned failure ${status}`) } } ) } ) webRouter.get('/no-cache', function (req, res, next) { res.header('Cache-Control', 'max-age=0') res.sendStatus(404) }) webRouter.get('/oops-express', (req, res, next) => next(new Error('Test error')) ) webRouter.get('/oops-internal', function (req, res, next) { throw new Error('Test error') }) webRouter.get('/oops-mongo', (req, res, next) => require('./models/Project').Project.findOne({}, function () { throw new Error('Test error') }) ) privateApiRouter.get('/opps-small', function (req, res, next) { logger.err('test error occured') res.sendStatus(200) }) webRouter.post('/error/client', function (req, res, next) { logger.warn( { err: req.body.error, meta: req.body.meta }, 'client side error' ) metrics.inc('client-side-error') res.sendStatus(204) }) webRouter.get( `/read/:token(${TokenAccessController.READ_ONLY_TOKEN_PATTERN})`, RateLimiterMiddleware.rateLimit({ endpointName: 'read-only-token', maxRequests: 15, timeInterval: 60, }), AnalyticsRegistrationSourceMiddleware.setSource('link-sharing'), TokenAccessController.tokenAccessPage, AnalyticsRegistrationSourceMiddleware.clearSource() ) webRouter.get( `/:token(${TokenAccessController.READ_AND_WRITE_TOKEN_PATTERN})`, RateLimiterMiddleware.rateLimit({ endpointName: 'read-and-write-token', maxRequests: 15, timeInterval: 60, }), AnalyticsRegistrationSourceMiddleware.setSource('link-sharing'), TokenAccessController.tokenAccessPage, AnalyticsRegistrationSourceMiddleware.clearSource() ) webRouter.post( `/:token(${TokenAccessController.READ_AND_WRITE_TOKEN_PATTERN})/grant`, RateLimiterMiddleware.rateLimit({ endpointName: 'grant-token-access-read-write', maxRequests: 10, timeInterval: 60, }), TokenAccessController.grantTokenAccessReadAndWrite ) webRouter.post( `/read/:token(${TokenAccessController.READ_ONLY_TOKEN_PATTERN})/grant`, RateLimiterMiddleware.rateLimit({ endpointName: 'grant-token-access-read-only', maxRequests: 10, timeInterval: 60, }), TokenAccessController.grantTokenAccessReadOnly ) webRouter.get('/unsupported-browser', renderUnsupportedBrowserPage) webRouter.get('*', ErrorController.notFound) }
overleaf/web/app/src/router.js/0
{ "file_path": "overleaf/web/app/src/router.js", "repo_id": "overleaf", "token_count": 13062 }
556
extends ../layout block content .content.content-alt .container .row .col-md-12 .card(ng-controller="RegisterUsersController") .page-header h1 Register New Users form.form .row .col-md-4.col-xs-8 input.form-control( name="email", type="text", placeholder="jane@example.com, joe@example.com", ng-model="inputs.emails", on-enter="registerUsers()" ) .col-md-8.col-xs-4 button.btn.btn-primary(ng-click="registerUsers()") #{translate("register")} .row-spaced(ng-show="error").ng-cloak.text-danger p Sorry, an error occured .row-spaced(ng-show="users.length > 0").ng-cloak.text-success p We've sent out welcome emails to the registered users. p You can also manually send them URLs below to allow them to reset their password and log in for the first time. p (Password reset tokens will expire after one week and the user will need registering again). hr(ng-show="users.length > 0").ng-cloak table(ng-show="users.length > 0").table.table-striped.ng-cloak tr th #{translate("email")} th Set Password Url tr(ng-repeat="user in users") td {{ user.email }} td(style="word-break: break-all;") {{ user.setNewPasswordUrl }}
overleaf/web/app/views/admin/register.pug/0
{ "file_path": "overleaf/web/app/views/admin/register.pug", "repo_id": "overleaf", "token_count": 628 }
557
div.binary-file.full-size( ng-controller="BinaryFileController" ng-show="ui.view == 'file'" ng-if="openFile" ) include ./binary-file-header img( ng-show="!failedLoad" ng-src="/project/{{ project_id }}/file/{{ openFile.id }}" ng-if="isImageFile()" ng-class="{'img-preview': !imgLoaded}" onerror="sl_binaryFilePreviewError()" onabort="sl_binaryFilePreviewError()" onload="sl_binaryFilePreviewLoaded()" ) img( ng-show="!failedLoad" ng-src="/project/{{ project_id }}/file/{{ openFile.id }}?format=png" ng-if="isPreviewableFile()" ng-class="{'img-preview': !imgLoaded}" onerror="sl_binaryFilePreviewError()" onabort="sl_binaryFilePreviewError()" onload="sl_binaryFilePreviewLoaded()" ) div(ng-if="isTextFile() && !textPreview.error") div.text-loading(ng-show="textPreview.loading && !textPreview.error") | #{translate('loading')}… div.text-preview(ng-show="textPreview.data && !textPreview.loading && !textPreview.error") div.scroll-container p | {{ textPreview.data }} p(ng-show="textPreview.shouldShowDots") | … p.no-preview( ng-if="failedLoad || textPreview.error || isUnpreviewableFile()" ) #{translate("no_preview_available")}
overleaf/web/app/views/project/editor/binary-file.pug/0
{ "file_path": "overleaf/web/app/views/project/editor/binary-file.pug", "repo_id": "overleaf", "token_count": 487 }
558
aside#left-menu.full-size( ng-class="{ 'shown': ui.leftMenuShown }" ng-cloak ) h4 #{translate("download")} ul.list-unstyled.nav.nav-downloads.text-center li a( ng-href="/project/{{project_id}}/download/zip" target="_blank" ) i.fa.fa-file-archive-o.fa-2x br | #{translate("source")} li a( ng-href="{{pdf.downloadUrl || pdf.url}}" target="_blank" ng-if="pdf.url" ) i.fa.fa-file-pdf-o.fa-2x br | PDF div.link-disabled( ng-if="!pdf.url" tooltip=translate('please_compile_pdf_before_download') tooltip-placement="bottom" ) i.fa.fa-file-pdf-o.fa-2x br | PDF span(ng-show="!anonymous") h4 #{translate("actions")} ul.list-unstyled.nav li(ng-controller="LeftMenuCloneProjectModalController") a( href, ng-click="openCloneProjectModal()" ) i.fa.fa-fw.fa-copy | &nbsp;&nbsp; #{translate("copy_project")} clone-project-modal( handle-hide="handleHide" project-id="projectId" project-name="projectName" open-project="openProject" show="show" ) != moduleIncludes("editorLeftMenu:actions", locals) li(ng-controller="WordCountModalController") a(href, ng-if="pdf.url", ng-click="openWordCountModal()") i.fa.fa-fw.fa-eye span &nbsp;&nbsp; #{translate("word_count")} a.link-disabled(href, ng-if="!pdf.url", tooltip=translate('please_compile_pdf_before_word_count')) i.fa.fa-fw.fa-eye span.link-disabled &nbsp;&nbsp; #{translate("word_count")} word-count-modal( clsi-server-id="clsiServerId" handle-hide="handleHide" project-id="projectId" show="show" ) if (moduleIncludesAvailable("editorLeftMenu:sync")) div(ng-show="!anonymous") h4() #{translate("sync")} != moduleIncludes("editorLeftMenu:sync", locals) if (moduleIncludesAvailable("editorLeftMenu:editing_services")) span(ng-show="!anonymous") h4 #{translate("services")} != moduleIncludes("editorLeftMenu:editing_services", locals) h4(ng-show="!anonymous") #{translate("settings")} form.settings(ng-controller="SettingsController", ng-show="!anonymous") .containter-fluid .form-controls(ng-show="permissions.write") label(for="compiler") #{translate("compiler")} select( name="compiler" ng-model="project.compiler" ) option(value='pdflatex') pdfLaTeX option(value='latex') LaTeX option(value='xelatex') XeLaTeX option(value='lualatex') LuaLaTeX if (typeof(allowedImageNames) !== 'undefined' && allowedImageNames.length > 0) .form-controls(ng-show="permissions.write") label(for="imageName") #{translate("tex_live_version")} select( name="imageName" ng-model="project.imageName" ) each image in allowedImageNames option(value=image.imageName) #{image.imageDesc} .form-controls(ng-show="permissions.write") label(for="rootDoc_id") #{translate("main_document")} select( name="rootDoc_id", ng-model="project.rootDoc_id", ng-options="doc.doc.id as doc.path for doc in getValidMainDocs()" ) .form-controls label(for="spellCheckLanguage") #{translate("spell_check")} select( name="spellCheckLanguage" ng-model="project.spellCheckLanguage" ) option(value="") #{translate("off")} optgroup(label="Language") for language in languages option( value=language.code )= language.name .form-controls label(for="autoComplete") #{translate("auto_complete")} select( name="autoComplete" ng-model="settings.autoComplete" ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]" ) .form-controls label(for="autoPairDelimiters") #{translate("auto_close_brackets")} select( name="autoPairDelimiters" ng-model="settings.autoPairDelimiters" ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]" ) .form-controls.code-check-setting label(for="syntaxValidation") #{translate("syntax_validation")} select( name="syntaxValidation" ng-model="settings.syntaxValidation" ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]" ) .form-controls label(for="editorTheme") #{translate("editor_theme")} select( name="editorTheme" ng-model="settings.editorTheme" ) each editorTheme in editorThemes option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')} if (settings.overleaf != null && !isIEEE(brandVariation)) .form-controls label(for="overallTheme") #{translate("overall_theme")} select( name="overallTheme" ng-if="!ui.loadingStyleSheet" ng-model="settings.overallTheme" ng-options="overallTheme.val as overallTheme.name for overallTheme in overallThemesList" ) p.loading.pull-right( ng-if="ui.loadingStyleSheet" ) i.fa.fa-fw.fa-spin.fa-refresh .form-controls(ng-show="!anonymous") label(for="mode") #{translate("keybindings")} select( name="mode" ng-model="settings.mode" ) option(value='default') None option(value='vim') Vim option(value='emacs') Emacs .form-controls label(for="fontSize") #{translate("font_size")} select( name="fontSize" ng-model="fontSizeAsStr" ng-model-options="{ getterSetter: true }" ) each size in ['10','11','12','13','14','16','18','20','22','24'] option(value=size) #{size}px .form-controls label(for="fontFamily") #{translate("font_family")} select( name="fontFamily" ng-model="settings.fontFamily" ) option(value='monaco') Monaco / Menlo / Consolas option(value='lucida') Lucida / Source Code Pro .form-controls label(for="lineHeight") #{translate("line_height")} select( name="lineHeight" ng-model="settings.lineHeight" ) each lineHeight in ['compact', 'normal', 'wide'] option(value=lineHeight) #{translate(lineHeight)} .form-controls label(for="pdfViewer") #{translate("pdf_viewer")} select( name="pdfViewer" ng-model="settings.pdfViewer" ) option(value="pdfjs") #{translate("built_in")} option(value="native") #{translate("native")} h4 #{translate("help")} ul.list-unstyled.nav li(ng-controller="HotkeysModalController") a(ng-click="openHotkeysModal()") i.fa.fa-keyboard-o.fa-fw | &nbsp;&nbsp; #{translate("show_hotkeys")} hotkeys-modal( handle-hide="handleHide" show="show" track-changes-visible="trackChangesVisible" is-mac="isMac" ) if showSupport li a(href='/learn', target="_blank") i.fa.fa-book.fa-fw | &nbsp;&nbsp; #{translate('documentation')} li a(ng-controller="ContactModal", ng-click="contactUsModal()") i.fa.fa-question.fa-fw | &nbsp;&nbsp; #{translate("contact_us")} #left-menu-mask( ng-show="ui.leftMenuShown", ng-click="ui.leftMenuShown = false" ng-cloak ) script(type='text/ng-template', id='cloneProjectModalTemplate') .modal-header h3 #{translate("copy_project")} .modal-body .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}} .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")} form(name="cloneProjectForm", novalidate) .form-group label #{translate("new_name")} input.form-control( type="text", placeholder="New Project Name", required, ng-model="inputs.projectName", on-enter="clone()", focus-on="open" ) .modal-footer button.btn.btn-default( ng-disabled="state.inflight" ng-click="cancel()" ) #{translate("cancel")} button.btn.btn-primary( ng-disabled="cloneProjectForm.$invalid || state.inflight" ng-click="clone()" ) span(ng-hide="state.inflight") #{translate("copy")} span(ng-show="state.inflight") #{translate("copying")}… script(type='text/ng-template', id='wordCountModalTemplate') .modal-header h3 #{translate("word_count")} .modal-body div(ng-if="status.loading") .loading(ng-show="!status.error && status.loading") i.fa.fa-refresh.fa-spin.fa-fw span &nbsp; #{translate("loading")}… div.pdf-disabled( ng-if="!pdf.url" tooltip=translate('please_compile_pdf_before_word_count') tooltip-placement="bottom" ) div(ng-if="!status.loading") .container-fluid .row(ng-show='data.messages.length > 0') .col-xs-12 .alert.alert-danger p(style="white-space: pre-wrap") {{data.messages}} .row .col-xs-4 .pull-right #{translate("total_words")} : .col-xs-6 {{data.textWords}} .row .col-xs-4 .pull-right #{translate("headers")} : .col-xs-6 {{data.headers}} .row .col-xs-4 .pull-right #{translate("math_inline")} : .col-xs-6 {{data.mathInline}} .row .col-xs-4 .pull-right #{translate("math_display")} : .col-xs-6 {{data.mathDisplay}} .modal-footer button.btn.btn-default( ng-disabled="state.inflight" ng-click="cancel()" ) #{translate("done")}
overleaf/web/app/views/project/editor/left-menu.pug/0
{ "file_path": "overleaf/web/app/views/project/editor/left-menu.pug", "repo_id": "overleaf", "token_count": 4173 }
559
.dropdown( dropdown dropdown-append-to-body ) a.btn.btn-primary.sidebar-new-proj-btn.dropdown-toggle( href="#", data-toggle="dropdown", dropdown-toggle ) | #{translate("new_project")} ul.dropdown-menu(role="menu") li a( href, ng-click="openCreateProjectModal()" ) #{translate("blank_project")} li a( href, ng-click="openCreateProjectModal('example')" ) #{translate("example_project")} li a( href, ng-click="openUploadProjectModal()" ) #{translate("upload_project")} != moduleIncludes("newProjectMenu", locals) if portalTemplates.length > 0 //- portalTemplates is set in ProjectController li.divider li.dropdown-header #{translate("institution")} #{translate("templates")} for portal in portalTemplates li a.menu-indent( href=portal.url + "#templates", ng-non-bindable ) #{portal.name} if (templates) //- templates is an express local var, via settings.templateLinks li.divider li.dropdown-header #{translate("templates")} each item in templates li a.menu-indent(href=item.url) #{translate(item.name)} .row-spaced(ng-if="projects.length > 0", ng-cloak) ul.list-unstyled.folders-menu( ng-controller="TagListController" ) li(ng-class="{active: (filter == 'all')}", ng-click="filterProjects('all')") a(href) #{translate("all_projects")} li(ng-class="{active: (filter == 'owned')}", ng-click="filterProjects('owned')") a(href) #{translate("your_projects")} li(ng-class="{active: (filter == 'shared')}", ng-click="filterProjects('shared')") a(href) #{translate("shared_with_you")} li(ng-class="{active: (filter == 'archived')}", ng-click="filterProjects('archived')") a(href) #{settings.overleaf ? translate("archived_projects") : translate("deleted_projects")} li(ng-class="{active: (filter == 'trashed')}", ng-click="filterProjects('trashed')") a(href) #{translate("trashed_projects")} li.separator h2 #{translate("tags_slash_folders")} li.tag(ng-cloak) a.tag-name(href, ng-click="openNewTagModal()") i.fa.fa-fw.fa-plus(aria-hidden="true") span.name #{translate("new_folder")} li.tag( ng-repeat="tag in tags | orderBy:'name'", ng-class="{active: tag.selected}", ng-cloak, ng-click="selectTag(tag)" ) a.tag-name(href) i.icon.fa.fa-fw( ng-class="{\ 'fa-folder-open': tag.selected,\ 'fa-folder': !tag.selected\ }" ng-style="{ 'color': 'hsl({{ getHueForTagId(tag._id) }}, 70%, 45%)' }" aria-hidden="true" ) span.name {{tag.name}} span.subdued ({{countProjectsForTag(tag)}}) span.dropdown.tag-menu(dropdown) a.dropdown-toggle( href="#", data-toggle="dropdown", dropdown-toggle, stop-propagation="click" ) span.caret ul.dropdown-menu.dropdown-menu-right( role="menu" ) li a(href, ng-click="renameTag(tag)", stop-propagation="click") | #{translate("rename")} li a(href, ng-click="deleteTag(tag)", stop-propagation="click") | #{translate("delete")} li.tag.untagged( ng-if="tags.length", ng-cloak, ng-click="selectUntagged()" ng-class="{active: filter === 'untagged'}", ) a.tag-name(href) span.name | #{translate("uncategorized")} span.subdued ({{ nUntagged }}) .row-spaced(ng-if="projects.length == 0", ng-cloak) .first-project div i.fa.fa-arrow-up.fa-2x(aria-hidden="true") div strong #{translate("create_your_first_project")} if (isOverleaf) span(ng-controller="LeftHandMenuPromoController", ng-cloak) .row-spaced#userProfileInformation(ng-if="hasProjects") div(ng-hide="withAffiliations", ng-cloak) hr .text-centered.user-profile p Are you affiliated with an institution? a.btn.btn-info( href="/user/settings" ) Add Affiliation //- .row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered //- hr //- p.small #{translate("on_free_sl")} //- p //- a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")} //- p.small.text-centered //- | #{translate("or_unlock_features_bonus")} //- a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}. .row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered hr p.small To help you work from home throughout 2021, we're providing discounted plans and special initiatives. p a(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Dash-Sidebar").btn.btn-primary Upgrade
overleaf/web/app/views/project/list/side-bar.pug/0
{ "file_path": "overleaf/web/app/views/project/list/side-bar.pug", "repo_id": "overleaf", "token_count": 2078 }
560
each publisher in managedPublishers p | You are a manager of | strong(ng-non-bindable)= publisher.name p a(href="/publishers/" + publisher.slug + "/hub") i.fa.fa-fw.fa-user-circle | &nbsp; | View hub p a(href="/manage/publishers/" + publisher.slug + "/managers") i.fa.fa-fw.fa-users | &nbsp; | Manage publisher managers hr
overleaf/web/app/views/subscriptions/dashboard/_managed_publishers.pug/0
{ "file_path": "overleaf/web/app/views/subscriptions/dashboard/_managed_publishers.pug", "repo_id": "overleaf", "token_count": 157 }
561
extends ../layout block vars - metadata = { viewport: true } block content main.content.content-alt#main-content .container .row .col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4 .card .page-header h1 #{translate("log_in")} form(async-form="login", name="loginForm", action='/login', method="POST", ng-cloak) input(name='_csrf', type='hidden', value=csrfToken) form-messages(for="loginForm") .form-group input.form-control( type='email', name='email', required, placeholder='email@example.com', ng-model="email", ng-model-options="{ updateOn: 'blur' }", focus="true" ) span.small.text-primary(ng-show="loginForm.email.$invalid && loginForm.email.$dirty") | #{translate("must_be_email_address")} .form-group input.form-control( type='password', name='password', required, placeholder='********', ng-model="password" ) span.small.text-primary(ng-show="loginForm.password.$invalid && loginForm.password.$dirty") | #{translate("required")} .actions button.btn-primary.btn( type='submit', ng-disabled="loginForm.inflight" ) span(ng-show="!loginForm.inflight") #{translate("login")} span(ng-show="loginForm.inflight") #{translate("logging_in")}… a.pull-right(href='/user/password/reset') #{translate("forgot_your_password")}?
overleaf/web/app/views/user/login.pug/0
{ "file_path": "overleaf/web/app/views/user/login.pug", "repo_id": "overleaf", "token_count": 753 }
562
#!/bin/bash set -e function upload_with_content_type() { content_type=$1 bucket=$2 shift 2 content_type_options="" if [[ "$content_type" != "-" ]]; then content_type_options="-h Content-Type:${content_type};charset=utf-8" fi # DOCS for gsutil -- it does not have long command line flags! ## global flags # -h NAME:VALUE add header, can occur multiples times # -m upload with multiple threads ## rsync flags # -r traverse into directories recursively # -x Python regex for excluding files from the sync gsutil \ -h "Cache-Control:public, max-age=31536000" \ ${content_type_options} \ -m \ rsync \ -r \ "$@" \ "/tmp/public/" \ "${bucket}/public/" } function upload_into_bucket() { bucket=$1 # stylesheets upload_with_content_type 'text/css' "$bucket" \ -x '.+(?<!\.css)$' # javascript files upload_with_content_type 'application/javascript' "$bucket" \ -x '.+(?<!\.js)$' # the rest upload_with_content_type '-' "$bucket" \ -x '.+\.(css|js)$' } # Upload to staging CDN if branch is either 'master' or 'staging-master' or main variants if [[ "$BRANCH_NAME" == "master" || "$BRANCH_NAME" == "staging-master" || "$BRANCH_NAME" == "main" || "$BRANCH_NAME" == "staging-main" ]]; then tar --directory=/tmp/ -xf build.tar # delete source maps find /tmp/public -name '*.js.map' -delete upload_into_bucket $CDN_STAG # Only upload to production CDN if branch is if [[ "$BRANCH_NAME" == "master" || "$BRANCH_NAME" == "main" ]]; then upload_into_bucket $CDN_PROD fi fi
overleaf/web/bin/cdn_upload/0
{ "file_path": "overleaf/web/bin/cdn_upload", "repo_id": "overleaf", "token_count": 640 }
563
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300; src: local('Open Sans Light'), local('OpenSans-Light'), url('open-sans-v17-latin-300.woff2') format('woff2'), url('open-sans-v17-latin-300.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans Regular'), local('OpenSans-Regular'), url('open-sans-v17-latin-regular.woff2') format('woff2'), url('open-sans-v17-latin-regular.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url('open-sans-v17-latin-600.woff2') format('woff2'), url('open-sans-v17-latin-600.woff') format('woff'); } @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; src: local('Open Sans Bold'), local('OpenSans-Bold'), url('open-sans-v17-latin-700.woff2') format('woff2'), url('open-sans-v17-latin-700.woff') format('woff'); }
overleaf/web/frontend/fonts/open-sans.css/0
{ "file_path": "overleaf/web/frontend/fonts/open-sans.css", "repo_id": "overleaf", "token_count": 438 }
564
// TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ import App from '../base' export default App.directive('maxHeight', () => ({ restrict: 'A', link(scope, element, attrs) { return scope.$watch(attrs.maxHeight, function (value) { if (value != null) { return element.css({ 'max-height': value }) } }) }, }))
overleaf/web/frontend/js/directives/maxHeight.js/0
{ "file_path": "overleaf/web/frontend/js/directives/maxHeight.js", "repo_id": "overleaf", "token_count": 207 }
565
const TIMESTAMP_GROUP_SIZE = 5 * 60 * 1000 // 5 minutes export function appendMessage(messageList, message) { const lastMessage = messageList[messageList.length - 1] const shouldGroup = lastMessage && message && message.user && message.user.id && message.user.id === lastMessage.user.id && message.timestamp - lastMessage.timestamp < TIMESTAMP_GROUP_SIZE if (shouldGroup) { return messageList.slice(0, messageList.length - 1).concat({ ...lastMessage, // the `id` is updated to the latest received content when a new // message is appended or prepended id: message.id, timestamp: message.timestamp, contents: lastMessage.contents.concat(message.content), }) } else { return messageList.slice(0).concat({ id: message.id, user: message.user, timestamp: message.timestamp, contents: [message.content], }) } } export function prependMessages(messageList, messages) { const listCopy = messageList.slice(0) messages .slice(0) .reverse() .forEach(message => { const firstMessage = listCopy[0] const shouldGroup = firstMessage && message && message.user && message.user.id === firstMessage.user.id && firstMessage.timestamp - message.timestamp < TIMESTAMP_GROUP_SIZE if (shouldGroup) { firstMessage.id = message.id firstMessage.timestamp = message.timestamp firstMessage.contents = [message.content].concat(firstMessage.contents) } else { listCopy.unshift({ id: message.id, user: message.user, timestamp: message.timestamp, contents: [message.content], }) } }) return listCopy }
overleaf/web/frontend/js/features/chat/utils/message-list-appender.js/0
{ "file_path": "overleaf/web/frontend/js/features/chat/utils/message-list-appender.js", "repo_id": "overleaf", "token_count": 683 }
566
import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) { const { t } = useTranslation() const classes = classNames('btn', 'btn-full-height', { active: trackChangesIsOpen && !disabled, disabled: disabled, }) return ( // eslint-disable-next-line jsx-a11y/anchor-is-valid <a role="button" disabled={disabled} className={classes} href="#" onClick={onClick} > <i className="review-icon" /> <p className="toolbar-label">{t('review')}</p> </a> ) } TrackChangesToggleButton.propTypes = { trackChangesIsOpen: PropTypes.bool, disabled: PropTypes.bool, onClick: PropTypes.func.isRequired, } export default TrackChangesToggleButton
overleaf/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js/0
{ "file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js", "repo_id": "overleaf", "token_count": 310 }
567
import { useRef } from 'react' import PropTypes from 'prop-types' import { useDragLayer } from 'react-dnd' import classNames from 'classnames' // a custom component rendered on top of a draggable area that renders the // dragged item. See // https://react-dnd.github.io/react-dnd/examples/drag-around/custom-drag-layer // for more details. // Also used to display a container border when hovered. function FileTreeDraggablePreviewLayer({ isOver }) { const { isDragging, item, clientOffset } = useDragLayer(monitor => ({ isDragging: monitor.isDragging(), item: monitor.getItem(), clientOffset: monitor.getClientOffset(), })) const ref = useRef() const containerOffset = ref.current ? ref.current.getBoundingClientRect() : null if (!isDragging) { return null } return ( <div ref={ref} className={classNames('dnd-draggable-preview-layer', { 'dnd-droppable-hover': isOver, })} > <div style={getItemStyle(clientOffset, containerOffset)}> <DraggablePreviewItem title={item.title} /> </div> </div> ) } FileTreeDraggablePreviewLayer.propTypes = { isOver: PropTypes.bool.isRequired, } function DraggablePreviewItem({ title }) { return <div className="dnd-draggable-preview-item">{title}</div> } DraggablePreviewItem.propTypes = { title: PropTypes.string.isRequired, } // makes the preview item follow the cursor. // See https://react-dnd.github.io/react-dnd/docs/api/drag-layer-monitor function getItemStyle(clientOffset, containerOffset) { if (!containerOffset || !clientOffset) { return { display: 'none', } } const { x: containerX, y: containerY } = containerOffset const { x: clientX, y: clientY } = clientOffset const posX = clientX - containerX - 15 const posY = clientY - containerY - 15 const transform = `translate(${posX}px, ${posY}px)` return { transform, WebkitTransform: transform, } } export default FileTreeDraggablePreviewLayer
overleaf/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js/0
{ "file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js", "repo_id": "overleaf", "token_count": 696 }
568
import { createContext, useContext, useMemo, useReducer } from 'react' import { isCleanFilename } from '../util/safe-path' import PropTypes from 'prop-types' const FileTreeCreateNameContext = createContext() export const useFileTreeCreateName = () => { const context = useContext(FileTreeCreateNameContext) if (!context) { throw new Error( 'useFileTreeCreateName is only available inside FileTreeCreateNameProvider' ) } return context } export default function FileTreeCreateNameProvider({ children, initialName = '', }) { const [state, setName] = useReducer( (state, name) => ({ name, // the file name touchedName: true, // whether the name has been edited }), { name: initialName, touchedName: false, } ) // validate the file name const validName = useMemo(() => isCleanFilename(state.name.trim()), [state]) return ( <FileTreeCreateNameContext.Provider value={{ ...state, setName, validName }} > {children} </FileTreeCreateNameContext.Provider> ) } FileTreeCreateNameProvider.propTypes = { children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node, ]).isRequired, initialName: PropTypes.string, }
overleaf/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js/0
{ "file_path": "overleaf/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js", "repo_id": "overleaf", "token_count": 424 }
569
import { findInTreeOrThrow } from './find-in-tree' export function renameInTree(tree, id, { newName }) { return mutateInTree(tree, id, (parent, entity, index) => { const newParent = Object.assign([], parent) const newEntity = { ...entity, name: newName, } newParent[index] = newEntity return newParent }) } export function deleteInTree(tree, id) { return mutateInTree(tree, id, (parent, entity, index) => { return [...parent.slice(0, index), ...parent.slice(index + 1)] }) } export function moveInTree(tree, entityId, toFolderId) { const found = findInTreeOrThrow(tree, entityId) if (found.parentFolderId === toFolderId) { // nothing to do (the entity was probably already moved) return tree } const newFileTreeData = deleteInTree(tree, entityId) return createEntityInTree(newFileTreeData, toFolderId, { ...found.entity, type: found.type, }) } export function createEntityInTree(tree, parentFolderId, newEntityData) { const { type, ...newEntity } = newEntityData if (!type) throw new Error('Entity has no type') const entityType = `${type}s` return mutateInTree(tree, parentFolderId, (parent, folder, index) => { parent[index] = { ...folder, [entityType]: [...folder[entityType], newEntity], } return parent }) } function mutateInTree(tree, id, mutationFunction) { if (tree._id === id) { // covers the root folder case: it has no parent so in order to use // mutationFunction we pass an empty array as the parent and return the // mutated tree directly const [newTree] = mutationFunction([], tree, 0) return newTree } for (const entityType of ['docs', 'fileRefs', 'folders']) { for (let index = 0; index < tree[entityType].length; index++) { const entity = tree[entityType][index] if (entity._id === id) { return { ...tree, [entityType]: mutationFunction(tree[entityType], entity, index), } } } } const newFolders = tree.folders.map(folder => mutateInTree(folder, id, mutationFunction) ) return { ...tree, folders: newFolders } }
overleaf/web/frontend/js/features/file-tree/util/mutate-in-tree.js/0
{ "file_path": "overleaf/web/frontend/js/features/file-tree/util/mutate-in-tree.js", "repo_id": "overleaf", "token_count": 767 }
570
const COMMAND_LEVELS = { book: 10, part: 20, addpart: 20, chapter: 30, addchap: 30, section: 40, addsect: 40, subsection: 50, subsubsection: 60, paragraph: 70, subparagraph: 80, } /* * * RegExp matcher parts: * * REGEX_START: begining of line, any number of spaces, double \ (required) * REGEX_COMMAND: any of the listed commands (required) * REGEX_SPACING: spaces and * between groups (optional) * REGEX_SHORT_TITLE: a text between square brackets (optional) * REGEX_TITLE: a text between curly brackets (required) * */ const REGEX_START = '^\\s*\\\\' const REGEX_COMMAND = `(${Object.keys(COMMAND_LEVELS).join('|')})` const REGEX_SPACING = '\\s?\\*?\\s?' const REGEX_SHORT_TITLE = '(\\[([^\\]]+)\\])?' const REGEX_TITLE = '{(.*)}' const MATCHER = new RegExp( `${REGEX_START}${REGEX_COMMAND}${REGEX_SPACING}${REGEX_SHORT_TITLE}${REGEX_SPACING}${REGEX_TITLE}` ) function matchOutline(content) { const lines = content.split('\n') const flatOutline = [] lines.forEach((line, lineId) => { const match = line.match(MATCHER) if (!match) return const [, command, , shortTitle, title] = match flatOutline.push({ line: lineId + 1, title: matchDisplayTitle(shortTitle || title), level: COMMAND_LEVELS[command], }) }) return flatOutline } const DISPLAY_TITLE_REGEX = /([^\\]*)\\([^{]+){([^}]+)}(.*)/ const END_OF_TITLE_REGEX = /^([^{}]*?({[^{}]*?}[^{}]*?)*)}/ /* * Attempt to improve the display of the outline title for titles with commands. * Either skip the command (for labels) or display the command's content instead * of the entire command. * * e.g. "Label \\label{foo} between" => "Label between" * e.g. "TT \\texttt{Bar}" => "TT Bar" * */ function matchDisplayTitle(title) { const closingBracketPosition = title.indexOf('}') if (closingBracketPosition < 0) { // simple title (no commands) return title } // if there is anything outside the title def on the line, remove it // before proceeding const titleOnlyMatch = title.match(END_OF_TITLE_REGEX) if (titleOnlyMatch) { title = titleOnlyMatch[1] } const titleMatch = title.match(DISPLAY_TITLE_REGEX) if (!titleMatch) { // no contained commands; strip everything after the first closing bracket return title.substring(0, closingBracketPosition) } const [, textBefore, command, commandContent, textAfter] = titleMatch if (command === 'label') { // label: don't display them at all title = `${textBefore}${textAfter}` } else { // display the content of the command. Works well for formatting commands title = `${textBefore}${commandContent}${textAfter}` } return title } function nestOutline(flatOutline) { const parentOutlines = {} const nestedOutlines = [] flatOutline.forEach(outline => { const parentOutlineLevels = Object.keys(parentOutlines) // find the nearest parent outline const nearestParentLevel = parentOutlineLevels .reverse() .find(level => level < outline.level) const parentOutline = parentOutlines[nearestParentLevel] if (!parentOutline) { // top level nestedOutlines.push(outline) } else if (!parentOutline.children) { // first outline in this node parentOutline.children = [outline] } else { // push outline to node parentOutline.children.push(outline) } // store the outline as new parent at its level and forget lower-level // outlines (if any) as they shouldn't get any children anymore parentOutlines[outline.level] = outline parentOutlineLevels .filter(level => level > outline.level) .forEach(level => delete parentOutlines[level]) }) return nestedOutlines } export { matchOutline, nestOutline }
overleaf/web/frontend/js/features/outline/outline-parser.js/0
{ "file_path": "overleaf/web/frontend/js/features/outline/outline-parser.js", "repo_id": "overleaf", "token_count": 1336 }
571
import { useCallback, useState } from 'react' import PropTypes from 'prop-types' import { Button, Col, OverlayTrigger, Row, Tooltip } from 'react-bootstrap' import { Trans } from 'react-i18next' import Icon from '../../../shared/components/icon' import { useShareProjectContext } from './share-project-modal' import { setProjectAccessLevel } from '../utils/api' import CopyLink from '../../../shared/components/copy-link' import { useProjectContext } from '../../../shared/context/project-context' export default function LinkSharing() { const [inflight, setInflight] = useState(false) const { monitorRequest } = useShareProjectContext() const project = useProjectContext() // set the access level of a project const setAccessLevel = useCallback( publicAccesLevel => { setInflight(true) monitorRequest(() => setProjectAccessLevel(project, publicAccesLevel)) .then(() => { // NOTE: not calling `updateProject` here as it receives data via // project:publicAccessLevel:changed and project:tokens:changed // over the websocket connection // TODO: eventTracking.sendMB('project-make-token-based') when publicAccesLevel is 'tokenBased' }) .finally(() => { setInflight(false) }) }, [monitorRequest, project] ) switch (project.publicAccesLevel) { // Private (with token-access available) case 'private': return ( <PrivateSharing setAccessLevel={setAccessLevel} inflight={inflight} /> ) // Token-based access case 'tokenBased': return ( <TokenBasedSharing setAccessLevel={setAccessLevel} inflight={inflight} /> ) // Legacy public-access case 'readAndWrite': case 'readOnly': return ( <LegacySharing setAccessLevel={setAccessLevel} accessLevel={project.publicAccesLevel} inflight={inflight} /> ) default: return null } } function PrivateSharing({ setAccessLevel, inflight }) { return ( <Row className="public-access-level"> <Col xs={12} className="text-center"> <Trans i18nKey="link_sharing_is_off" /> <span>&nbsp;&nbsp;</span> <Button type="button" bsStyle="link" className="btn-inline-link" onClick={() => setAccessLevel('tokenBased')} disabled={inflight} > <Trans i18nKey="turn_on_link_sharing" /> </Button> <span>&nbsp;&nbsp;</span> <LinkSharingInfo /> </Col> </Row> ) } PrivateSharing.propTypes = { setAccessLevel: PropTypes.func.isRequired, inflight: PropTypes.bool, } function TokenBasedSharing({ setAccessLevel, inflight }) { const project = useProjectContext() return ( <Row className="public-access-level"> <Col xs={12} className="text-center"> <strong> <Trans i18nKey="link_sharing_is_on" /> </strong> <span>&nbsp;&nbsp;</span> <Button bsStyle="link" className="btn-inline-link" onClick={() => setAccessLevel('private')} disabled={inflight} > <Trans i18nKey="turn_off_link_sharing" /> </Button> <span>&nbsp;&nbsp;</span> <LinkSharingInfo /> </Col> <Col xs={12} className="access-token-display-area"> <div className="access-token-wrapper"> <strong> <Trans i18nKey="anyone_with_link_can_edit" /> </strong> <AccessToken token={project?.tokens?.readAndWrite} path="/" tooltipId="tooltip-copy-link-rw" /> </div> <div className="access-token-wrapper"> <strong> <Trans i18nKey="anyone_with_link_can_view" /> </strong> <AccessToken token={project?.tokens?.readOnly} path="/read/" tooltipId="tooltip-copy-link-ro" /> </div> </Col> </Row> ) } TokenBasedSharing.propTypes = { setAccessLevel: PropTypes.func.isRequired, inflight: PropTypes.bool, } function LegacySharing({ accessLevel, setAccessLevel, inflight }) { return ( <Row className="public-access-level"> <Col xs={12} className="text-center"> <strong> {accessLevel === 'readAndWrite' && ( <Trans i18nKey="this_project_is_public" /> )} {accessLevel === 'readOnly' && ( <Trans i18nKey="this_project_is_public_read_only" /> )} </strong> <span>&nbsp;&nbsp;</span> <Button type="button" bsStyle="link" className="btn-inline-link" onClick={() => setAccessLevel('private')} disabled={inflight} > <Trans i18nKey="make_private" /> </Button> <span>&nbsp;&nbsp;</span> <LinkSharingInfo /> </Col> </Row> ) } LegacySharing.propTypes = { accessLevel: PropTypes.string.isRequired, setAccessLevel: PropTypes.func.isRequired, inflight: PropTypes.bool, } export function ReadOnlyTokenLink() { const project = useProjectContext() return ( <Row className="public-access-level"> <Col xs={12} className="access-token-display-area"> <div className="access-token-wrapper"> <strong> <Trans i18nKey="anyone_with_link_can_view" /> </strong> <AccessToken token={project?.tokens?.readOnly} path="/read/" tooltipId="tooltip-copy-link-ro" /> </div> </Col> </Row> ) } function AccessToken({ token, path, tooltipId }) { if (!token) { return ( <pre className="access-token"> <span> <Trans i18nKey="loading" />… </span> </pre> ) } const link = `${window.location.origin}${path}${token}` return ( <pre className="access-token"> <span>{link}</span> <CopyLink link={link} tooltipId={tooltipId} /> </pre> ) } AccessToken.propTypes = { token: PropTypes.string, tooltipId: PropTypes.string.isRequired, path: PropTypes.string.isRequired, } function LinkSharingInfo() { return ( <OverlayTrigger placement="top" overlay={ <Tooltip id="tooltip-link-sharing-info"> <Trans i18nKey="learn_more_about_link_sharing" /> </Tooltip> } > <a href="/learn/how-to/What_is_Link_Sharing%3F" target="_blank" rel="noopener" > <Icon type="question-circle" /> </a> </OverlayTrigger> ) }
overleaf/web/frontend/js/features/share-project-modal/components/link-sharing.js/0
{ "file_path": "overleaf/web/frontend/js/features/share-project-modal/components/link-sharing.js", "repo_id": "overleaf", "token_count": 3006 }
572
import { TabPanels, TabPanel } from '@reach/tabs' import { useTranslation } from 'react-i18next' import PropTypes from 'prop-types' import SymbolPaletteItems from './symbol-palette-items' export default function SymbolPaletteBody({ categories, categorisedSymbols, filteredSymbols, handleSelect, focusInput, }) { const { t } = useTranslation() // searching with matches: show the matched symbols // searching with no matches: show a message // note: include empty tab panels so that aria-controls on tabs can still reference the panel ids if (filteredSymbols) { return ( <> {filteredSymbols.length ? ( <SymbolPaletteItems items={filteredSymbols} handleSelect={handleSelect} focusInput={focusInput} /> ) : ( <div className="symbol-palette-empty">{t('no_symbols_found')}</div> )} <TabPanels> {categories.map(category => ( <TabPanel key={category.id} tabIndex={-1} /> ))} </TabPanels> </> ) } // not searching: show the symbols grouped by category return ( <TabPanels> {categories.map(category => ( <TabPanel key={category.id} tabIndex={-1}> <SymbolPaletteItems items={categorisedSymbols[category.id]} handleSelect={handleSelect} focusInput={focusInput} /> </TabPanel> ))} </TabPanels> ) } SymbolPaletteBody.propTypes = { categories: PropTypes.arrayOf(PropTypes.object).isRequired, categorisedSymbols: PropTypes.object, filteredSymbols: PropTypes.arrayOf(PropTypes.object), handleSelect: PropTypes.func.isRequired, focusInput: PropTypes.func.isRequired, }
overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js/0
{ "file_path": "overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js", "repo_id": "overleaf", "token_count": 718 }
573
// TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ import App from '../base' import moment from 'moment' moment.updateLocale('en', { calendar: { lastDay: '[Yesterday]', sameDay: '[Today]', nextDay: '[Tomorrow]', lastWeek: 'ddd, Do MMM YY', nextWeek: 'ddd, Do MMM YY', sameElse: 'ddd, Do MMM YY', }, }) App.filter( 'formatDate', () => function (date, format) { if (!date) return 'N/A' if (format == null) { format = 'Do MMM YYYY, h:mm a' } return moment(date).format(format) } ) App.filter( 'utcDate', () => function (date, format) { if (!date) return 'N/A' if (format == null) { format = 'D MMM YYYY, HH:mm:ss' } return moment(date).utc().format(format) + ' UTC' } ) App.filter('relativeDate', () => date => moment(date).calendar()) App.filter('fromNowDate', () => date => moment(date).fromNow())
overleaf/web/frontend/js/filters/formatDate.js/0
{ "file_path": "overleaf/web/frontend/js/filters/formatDate.js", "repo_id": "overleaf", "token_count": 481 }
574
/* global io */ class SocketShimBase { static connect(url, options) { return new SocketShimBase() } constructor(socket) { this._socket = socket } } const transparentMethods = [ 'connect', 'disconnect', 'emit', 'on', 'removeListener', ] for (const method of transparentMethods) { SocketShimBase.prototype[method] = function () { this._socket[method].apply(this._socket, arguments) } } class SocketShimNoop extends SocketShimBase { static connect() { return new SocketShimNoop() } constructor(socket) { super(socket) this.socket = { get connected() { return false }, get sessionid() { return undefined }, get transport() { return {} }, connect() {}, disconnect(reason) {}, } } connect() {} disconnect(reason) {} emit() {} on() {} removeListener() {} } class SocketShimV0 extends SocketShimBase { static connect(url, options) { return new SocketShimV0(io.connect(url, options)) } constructor(socket) { super(socket) this.socket = this._socket.socket } } class SocketShimV2 extends SocketShimBase { static connect(url, options) { options.forceNew = options['force new connection'] // .resource has no leading slash, path wants to see one. options.path = '/' + options.resource options.reconnection = options.reconnect options.timeout = options['connect timeout'] return new SocketShimV2(url, options) } static get EVENT_MAP() { // Use the v2 event names transparently to the frontend. const connectionFailureEvents = [ 'connect_error', 'connect_timeout', 'error', ] return new Map([ ['connect_failed', connectionFailureEvents], ['error', connectionFailureEvents], ]) } _on(event, handler) { // Keep track of our event listeners. // We move them to a new socket in ._replaceSocketWithNewInstance() if (!this._events.has(event)) { this._events.set(event, [handler]) } else { this._events.get(event).push(handler) } this._socket.on(event, handler) } on(event, handler) { if (SocketShimV2.EVENT_MAP.has(event)) { for (const v2Event of SocketShimV2.EVENT_MAP.get(event)) { this._on(v2Event, handler) } } else { this._on(event, handler) } } _removeListener(event, handler) { // Keep track of our event listeners. // We move them to a new socket in ._replaceSocketWithNewInstance() if (this._events.has(event)) { const listeners = this._events.get(event) const pos = listeners.indexOf(handler) if (pos !== -1) { listeners.splice(pos, 1) } } this._socket.removeListener(event, handler) } removeListener(event, handler) { if (SocketShimV2.EVENT_MAP.has(event)) { for (const v2Event of SocketShimV2.EVENT_MAP.get(event)) { this._removeListener(v2Event, handler) } } else { this._removeListener(event, handler) } } static createNewSocket(url, options) { // open a brand new connection for the default namespace '/' // The old socket can still leak 'disconnect' events from the teardown // of the old transport. The leaking 'disconnect' events interfere with // the _new_ connection and cancel the new connect attempt. // Also skip the caching in these locations: // - `io.connect()` caches `io.Manager`s in `io.managers` // - `io.Manager().socket()` caches `io.Socket`s in its `this.nsps` return io.Manager(url, options).socket('/', options) } _replaceSocketWithNewInstance() { const oldSocket = this._socket const newSocket = SocketShimV2.createNewSocket(this._url, this._options) // move our existing event handlers to the new socket this._events.forEach((listeners, event) => { for (const listener of listeners) { oldSocket.removeListener(event, listener) newSocket.on(event, listener) } }) if (oldSocket.connected) { // We overwrite the reference to oldSocket soon. // Make sure we are disconnected. oldSocket.disconnect() } this._socket = newSocket } connect() { // have the same logic behind socket.connect and socket.socket.connect this._replaceSocketWithNewInstance() } constructor(url, options) { super(SocketShimV2.createNewSocket(url, options)) this._url = url this._options = options this._events = new Map() const self = this function _getEngine() { return (self._socket.io && self._socket.io.engine) || {} } this.socket = { get connected() { return self._socket.connected }, get sessionid() { if (self._socket.id) { return self._socket.id } // socket.id is discarded upon disconnect // the id is still available in the internal state return _getEngine().id }, get transport() { return _getEngine().transport }, connect() { self._replaceSocketWithNewInstance() }, disconnect(reason) { return self._socket.disconnect(reason) }, } } } let current if (typeof io === 'undefined' || !io) { sl_console.log('[socket.io] Shim: socket.io is not loaded, returning noop') current = SocketShimNoop } else if (typeof io.version === 'string' && io.version.slice(0, 1) === '0') { sl_console.log('[socket.io] Shim: detected v0') current = SocketShimV0 } else { // socket.io v2 does not have a global io.version attribute. sl_console.log('[socket.io] Shim: detected v2') current = SocketShimV2 } export default { SocketShimNoop, SocketShimV0, SocketShimV2, current, connect: current.connect, stub: () => new SocketShimNoop(), }
overleaf/web/frontend/js/ide/connection/SocketIoShim.js/0
{ "file_path": "overleaf/web/frontend/js/ide/connection/SocketIoShim.js", "repo_id": "overleaf", "token_count": 2172 }
575
/* eslint-disable max-len, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const packages = [ 'inputenc', 'graphicx', 'amsmath', 'geometry', 'amssymb', 'hyperref', 'babel', 'color', 'xcolor', 'url', 'natbib', 'fontenc', 'fancyhdr', 'amsfonts', 'booktabs', 'amsthm', 'float', 'tikz', 'caption', 'setspace', 'multirow', 'array', 'multicol', 'titlesec', 'enumitem', 'ifthen', 'listings', 'blindtext', 'subcaption', 'times', 'bm', 'subfigure', 'algorithm', 'fontspec', 'biblatex', 'tabularx', 'microtype', 'etoolbox', 'parskip', 'calc', 'verbatim', 'mathtools', 'epsfig', 'wrapfig', 'lipsum', 'cite', 'textcomp', 'longtable', 'textpos', 'algpseudocode', 'enumerate', 'subfig', 'pdfpages', 'epstopdf', 'latexsym', 'lmodern', 'pifont', 'ragged2e', 'rotating', 'dcolumn', 'xltxtra', 'marvosym', 'indentfirst', 'xspace', 'csquotes', 'xparse', 'changepage', 'soul', 'xunicode', 'comment', 'mathrsfs', 'tocbibind', 'lastpage', 'algorithm2e', 'pgfplots', 'lineno', 'graphics', 'algorithmic', 'fullpage', 'mathptmx', 'todonotes', 'ulem', 'tweaklist', 'moderncvstyleclassic', 'collection', 'moderncvcompatibility', 'gensymb', 'helvet', 'siunitx', 'adjustbox', 'placeins', 'colortbl', 'appendix', 'makeidx', 'supertabular', 'ifpdf', 'framed', 'aliascnt', 'layaureo', 'authblk', ] class PackageManager { constructor(metadataManager) { this.metadataManager = metadataManager } getCompletions(editor, session, pos, prefix, callback) { const usedPackages = Object.keys(this.metadataManager.getAllPackages()) const packageSnippets = [] for (const pkg of Array.from(packages)) { if (!Array.from(usedPackages).includes(pkg)) { packageSnippets.push({ caption: `\\usepackage{${pkg}}`, snippet: `\\usepackage{${pkg}}`, meta: 'pkg', }) } } packageSnippets.push({ caption: '\\usepackage{}', snippet: '\\usepackage{$1}', meta: 'pkg', score: 70, }) return callback(null, packageSnippets) } } export default PackageManager
overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/PackageManager.js/0
{ "file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/PackageManager.js", "repo_id": "overleaf", "token_count": 1077 }
576
import App from '../../../base' import iconTypeFromName from '../util/iconTypeFromName' App.controller( 'FileTreeEntityController', function ($scope, ide, $modal, $element) { $scope.MAX_DEPTH = 8 $scope.select = function (e) { if (e.ctrlKey || e.metaKey) { e.stopPropagation() const initialMultiSelectCount = ide.fileTreeManager.multiSelectedCount() ide.fileTreeManager.toggleMultiSelectEntity($scope.entity) if (initialMultiSelectCount === 0) { // On first multi selection, also include the current active/open file. return ide.fileTreeManager.multiSelectSelectedEntity() } } else { ide.fileTreeManager.selectEntity($scope.entity) return $scope.$emit('entity:selected', $scope.entity) } } if ($scope.entity.type === 'doc') { $scope.$watch('entity.selected', function (isSelected) { if (isSelected) { $scope.$emit('entity-file:selected', $scope.entity) if (!_isEntryElVisible($element)) { $scope.$applyAsync(function () { $element[0].scrollIntoView() }) } } }) } function _isEntryElVisible($entryEl) { const viewportEl = $('.file-tree-list') const entryElTop = $entryEl.offset().top const entryElBottom = entryElTop + $entryEl.outerHeight() const entryListViewportElTop = viewportEl.offset().top const entryListViewportElBottom = entryListViewportElTop + viewportEl.height() return ( entryElTop >= entryListViewportElTop && entryElBottom <= entryListViewportElBottom ) } $scope.iconTypeFromName = iconTypeFromName } )
overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js/0
{ "file_path": "overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js", "repo_id": "overleaf", "token_count": 706 }
577
/* eslint-disable camelcase, max-len, no-return-assign, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ import App from '../../../base' App.controller( 'HistoryDiffController', function ($scope, $modal, ide, eventTracking) { $scope.restoreDeletedDoc = function () { eventTracking.sendMB('history-restore-deleted') $scope.history.diff.restoreInProgress = true return ide.historyManager .restoreDeletedDoc($scope.history.diff.doc) .then(function (response) { const { data } = response $scope.history.diff.restoredDocNewId = data.doc_id $scope.history.diff.restoreInProgress = false return ($scope.history.diff.restoreDeletedSuccess = true) }) } $scope.openRestoreDiffModal = function () { eventTracking.sendMB('history-restore-modal') return $modal.open({ templateUrl: 'historyRestoreDiffModalTemplate', controller: 'HistoryRestoreDiffModalController', resolve: { diff() { return $scope.history.diff }, }, }) } return ($scope.backToEditorAfterRestore = () => ide.editorManager.openDoc({ id: $scope.history.diff.restoredDocNewId })) } ) export default App.controller( 'HistoryRestoreDiffModalController', function ($scope, $modalInstance, diff, ide, eventTracking) { $scope.state = { inflight: false } $scope.diff = diff $scope.restore = function () { eventTracking.sendMB('history-restored') $scope.state.inflight = true return ide.historyManager.restoreDiff(diff).then(function () { $scope.state.inflight = false $modalInstance.close() return ide.editorManager.openDoc(diff.doc) }) } return ($scope.cancel = () => $modalInstance.dismiss()) } )
overleaf/web/frontend/js/ide/history/controllers/HistoryDiffController.js/0
{ "file_path": "overleaf/web/frontend/js/ide/history/controllers/HistoryDiffController.js", "repo_id": "overleaf", "token_count": 812 }
578
/* eslint-disable max-len, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let MetadataManager export default MetadataManager = class MetadataManager { constructor(ide, $scope, metadata) { this.ide = ide this.$scope = $scope this.metadata = metadata this.ide.socket.on('broadcastDocMeta', data => { return this.metadata.onBroadcastDocMeta(data) }) this.$scope.$on('entity:deleted', this.metadata.onEntityDeleted) this.$scope.$on('file:upload:complete', this.metadata.fileUploadComplete) } loadProjectMetaFromServer() { return this.metadata.loadProjectMetaFromServer() } }
overleaf/web/frontend/js/ide/metadata/MetadataManager.js/0
{ "file_path": "overleaf/web/frontend/js/ide/metadata/MetadataManager.js", "repo_id": "overleaf", "token_count": 294 }
579
import _ from 'lodash' /* eslint-disable node/handle-callback-err, max-len, new-cap, no-return-assign, no-sequences, no-unused-vars, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from * DS102: Remove unnecessary code created because of implicit returns * DS103: Rewrite code to no longer use __guard__ * DS104: Avoid inline assignments * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ import App from '../../../base' import { captureMessage } from '../../../infrastructure/error-reporter' import pdfTextLayer from './pdfTextLayer' import pdfAnnotations from './pdfAnnotations' import pdfHighlights from './pdfHighlights' import pdfRenderer from './pdfRenderer' import pdfPage from './pdfPage' import pdfSpinner from './pdfSpinner' App.controller( 'pdfViewerController', function ( $scope, $q, $timeout, PDFRenderer, $element, pdfHighlights, pdfSpinner ) { this.load = function () { // $scope.pages = [] // Ensure previous document is torn down before loading the next one (to // prevent race conditions) const documentTearDown = $scope.document != null ? $scope.document.destroy() : Promise.resolve() // Keep track of whether the pdf has loaded (this allows rescale events to // be ignored until we are ready to render the pdf). $scope.isLoaded = false return documentTearDown.then(() => { $scope.loadCount = $scope.loadCount != null ? $scope.loadCount + 1 : 1 // TODO need a proper url manipulation library to add to query string let url = $scope.pdfSrc // add 'pdfng=true' to show that we are using the angular pdfjs viewer const queryStringExists = /\?/.test(url) url = url + (!queryStringExists ? '?' : '&') + 'pdfng=true' // Take references as these must be invoked for this very URL const firstRenderDone = $scope.firstRenderDone const updateConsumedBandwidth = $scope.updateConsumedBandwidth // for isolated compiles, load the pdf on-demand because nobody will overwrite it const onDemandLoading = true $scope.document = new PDFRenderer(url, { scale: 1, disableAutoFetch: onDemandLoading ? true : undefined, navigateFn(ref) { // this function captures clicks on the annotation links $scope.navigateTo = ref return $scope.$apply() }, progressCallback(progress) { updateConsumedBandwidth(progress.loaded) return $scope.$emit('progress', progress) }, loadedCallback() { return $scope.$emit('loaded') }, firstRenderDone, errorCallback(error) { // MissingPDFException is "expected" as the pdf file can be on a // CLSI server that has been cycled out. // Currently, there is NO error handling to handle this situation, // but we plan to add this in the future // (https://github.com/overleaf/issues/issues/2985) and this error // is causing noise in Sentry so ignore it if (!error || error.name !== 'MissingPDFException') { captureMessage(`pdfng error ${error}`) } return $scope.$emit('pdf:error', error) }, pageSizeChangeCallback(pageNum, deltaH) { return $scope.$broadcast('pdf:page:size-change', pageNum, deltaH) }, }) // we will have all the main information needed to start display // after the following promise is resolved $scope.loaded = $q .all({ numPages: $scope.document.getNumPages(), // get size of first page as default @ scale 1 pdfViewport: $scope.document.getPdfViewport(1, 1), }) .then(function (result) { $scope.pdfViewport = result.pdfViewport $scope.pdfPageSize = [ result.pdfViewport.height, result.pdfViewport.width, ] // console.log 'resolved q.all, page size is', result $scope.$emit('loaded') // we can now render the document and handle rescale events $scope.isLoaded = true return ($scope.numPages = result.numPages) }) .catch(function (error) { $scope.$emit('pdf:error', error) return $q.reject(error) }) return $scope.loaded }) } this.setScale = (scale, containerHeight, containerWidth) => $scope.loaded .then(function () { let numScale if (scale == null) { scale = {} } if (containerHeight === 0 || containerWidth === 0) { numScale = 1 } else if (scale.scaleMode === 'scale_mode_fit_width') { // TODO make this dynamic numScale = (containerWidth - 40) / $scope.pdfPageSize[1] } else if (scale.scaleMode === 'scale_mode_fit_height') { // TODO magic numbers for jquery ui layout numScale = (containerHeight - 20) / $scope.pdfPageSize[0] } else if (scale.scaleMode === 'scale_mode_value') { numScale = scale.scale } else if (scale.scaleMode === 'scale_mode_auto') { // TODO } else { scale.scaleMode = 'scale_mode_fit_width' numScale = (containerWidth - 40) / $scope.pdfPageSize[1] } // TODO $scope.scale.scale = numScale $scope.document.setScale(numScale) return ($scope.defaultPageSize = [ numScale * $scope.pdfPageSize[0], numScale * $scope.pdfPageSize[1], ]) }) // console.log 'in setScale result', $scope.scale.scale, $scope.defaultPageSize .catch(function (error) { $scope.$emit('pdf:error', error) return $q.reject(error) }) this.redraw = function (position) { // console.log 'in redraw' // console.log 'reseting pages array for', $scope.numPages $scope.pages = __range__(0, $scope.numPages - 1, true).map(i => ({ pageNum: i + 1, })) if (position != null && position.page != null) { // console.log 'position is', position.page, position.offset // console.log 'setting current page', position.page let pagenum = position.page if (pagenum > $scope.numPages - 1) { pagenum = $scope.numPages - 1 } $scope.pages[pagenum].current = true return ($scope.pages[pagenum].position = position) } } this.zoomIn = function () { // console.log 'zoom in' const newScale = $scope.scale.scale * 1.2 return ($scope.forceScale = { scaleMode: 'scale_mode_value', scale: newScale, }) } this.zoomOut = function () { // console.log 'zoom out' const newScale = $scope.scale.scale / 1.2 return ($scope.forceScale = { scaleMode: 'scale_mode_value', scale: newScale, }) } this.fitWidth = () => // console.log 'fit width' ($scope.forceScale = { scaleMode: 'scale_mode_fit_width' }) this.fitHeight = () => // console.log 'fit height' ($scope.forceScale = { scaleMode: 'scale_mode_fit_height' }) this.checkPosition = () => // console.log 'check position' ($scope.forceCheck = ($scope.forceCheck || 0) + 1) this.showRandomHighlights = () => // console.log 'show highlights' ($scope.highlights = [ { page: 3, h: 100, v: 100, height: 30, width: 200, }, ]) // we work with (pagenumber, % of height down page from top) // pdfListView works with (pagenumber, vertical position up page from // bottom measured in pts) this.getPdfPosition = function () { // console.log 'in getPdfPosition' let canvasOffset, pdfOffset, viewport let topPageIdx = 0 let topPage = $scope.pages[0] // find first visible page const visible = $scope.pages.some(function (page, i) { if (page.visible) { let ref return ([topPageIdx, topPage] = Array.from((ref = [i, page]))), ref } return false }) if (visible && topPage.element != null) { // console.log 'found it', topPageIdx } else { // console.log 'CANNOT FIND TOP PAGE' return } // console.log 'top page is', topPage.pageNum, topPage.elemTop, topPage.elemBottom, topPage const { top } = topPage.element.offset() const bottom = top + topPage.element.innerHeight() const viewportTop = $element.offset().top const viewportBottom = viewportTop + $element.height() const topVisible = top >= viewportTop && top < viewportBottom const someContentVisible = top < viewportTop && bottom > viewportTop // console.log 'in PdfListView', top, topVisible, someContentVisible, viewportTop if (topVisible) { canvasOffset = 0 } else if (someContentVisible) { canvasOffset = viewportTop - top } else { canvasOffset = null } // console.log 'pdfListview position = ', canvasOffset // instead of using promise, check if size is known and revert to // default otherwise // console.log 'looking up viewport', topPage.viewport, $scope.pdfViewport if (topPage.viewport) { ;({ viewport } = topPage) pdfOffset = viewport.convertToPdfPoint(0, canvasOffset) } else { // console.log 'WARNING: had to default to global page size' viewport = $scope.pdfViewport const scaledOffset = canvasOffset / $scope.scale.scale pdfOffset = viewport.convertToPdfPoint(0, scaledOffset) } // console.log 'converted to offset = ', pdfOffset const newPosition = { page: topPageIdx, offset: { top: pdfOffset[1], left: 0 }, pageSize: { height: viewport.viewBox[3], width: viewport.viewBox[2] }, } return newPosition } this.computeOffset = function (page, position) { // console.log 'computing offset for', page, position const { element } = page // console.log 'element =', $(element), 'parent =', $(element).parent() const t1 = __guard__($(element).offset(), x => x.top) const t2 = __guard__($(element).parent().offset(), x1 => x1.top) if (!(t1 != null && t2 != null)) { return $q((resolve, reject) => reject('elements destroyed')) } const pageTop = $(element).offset().top - $(element).parent().offset().top // console.log('top of page scroll is', pageTop, 'vs', page.elemTop) // console.log('inner height is', $(element).innerHeight()) const currentScroll = $(element).parent().scrollTop() const { offset } = position // convert offset to pixels return $scope.document .getPdfViewport(page.pageNum) .then(function (viewport) { page.viewport = viewport const pageOffset = viewport.convertToViewportPoint( offset.left, offset.top ) // if the passed-in position doesn't have the page height/width add them now if (position.pageSize == null) { position.pageSize = { height: viewport.viewBox[3], width: viewport.viewBox[2], } } // console.log 'addition offset =', pageOffset // console.log 'total', pageTop + pageOffset[1] return Math.round(pageTop + pageOffset[1] + currentScroll) }) // # 10 is margin } this.setPdfPosition = function (page, position) { // console.log 'required pdf Position is', position return this.computeOffset(page, position).then(function (offset) { return $scope.$apply(() => { $scope.pleaseScrollTo = offset $scope.position = position }) }) } return this } ) export default App.directive('pdfViewer', ($q, $timeout, pdfSpinner) => ({ controller: 'pdfViewerController', controllerAs: 'ctrl', scope: { pdfSrc: '=', firstRenderDone: '=', updateConsumedBandwidth: '=', highlights: '=', position: '=', scale: '=', pleaseJumpTo: '=', }, template: `\ <div data-pdf-page class='pdf-page-container page-container' ng-repeat='page in pages'></div>\ `, link(scope, element, attrs, ctrl) { // console.log 'in pdfViewer element is', element // console.log 'attrs', attrs const spinner = new pdfSpinner() let layoutReady = $q.defer() layoutReady.notify('waiting for layout') layoutReady.promise.then(function () {}) // console.log 'layoutReady was resolved' const renderVisiblePages = function () { const visiblePages = getVisiblePages() const pages = getExtraPages(visiblePages) return scope.document.renderPages(pages) } var getVisiblePages = function () { const top = element[0].scrollTop const bottom = top + element[0].clientHeight const visiblePages = _.filter(scope.pages, function (page) { if (page.element == null) { return false } const pageElement = page.element[0] const pageTop = pageElement.offsetTop const pageBottom = pageTop + pageElement.clientHeight page.visible = pageTop < bottom && pageBottom > top return page.visible }) return visiblePages } var getExtraPages = function (visiblePages) { const extra = [] if (visiblePages.length > 0) { const firstVisiblePage = visiblePages[0].pageNum const firstVisiblePageIdx = firstVisiblePage - 1 const len = visiblePages.length const lastVisiblePage = visiblePages[len - 1].pageNum const lastVisiblePageIdx = lastVisiblePage - 1 // first page after if (lastVisiblePageIdx + 1 < scope.pages.length) { extra.push(scope.pages[lastVisiblePageIdx + 1]) } // page before if (firstVisiblePageIdx > 0) { extra.push(scope.pages[firstVisiblePageIdx - 1]) } // second page after if (lastVisiblePageIdx + 2 < scope.pages.length) { extra.push(scope.pages[lastVisiblePageIdx + 2]) } } return visiblePages.concat(extra) } let rescaleTimer = null const queueRescale = function (scale) { // console.log 'call to queueRescale' if (!scope.isLoaded) { return // ignore any requests to rescale before the document is loaded } if (rescaleTimer != null || layoutTimer != null || elementTimer != null) { return } // console.log 'adding to rescale queue' return (rescaleTimer = setTimeout(function () { doRescale(scale) return (rescaleTimer = null) }, 0)) } let spinnerTimer = null var doRescale = function (scale) { // console.log 'doRescale', scale if (scale == null) { return } const origposition = angular.copy(scope.position) // console.log 'origposition', origposition if (spinnerTimer == null) { spinnerTimer = setTimeout(function () { spinner.add(element) return (spinnerTimer = null) }, 100) } return layoutReady.promise.then(function (parentSize) { const [h, w] = Array.from(parentSize) // console.log 'in promise', h, w return ctrl .setScale(scale, h, w) .then(() => // console.log 'in setscale then', scale, h, w scope.$evalAsync(function () { if (spinnerTimer) { clearTimeout(spinnerTimer) } else { spinner.remove(element) } // stop displaying the text layer element.removeClass('pdfjs-viewer-show-text') ctrl.redraw(origposition) $timeout(renderVisiblePages) return (scope.loadSuccess = true) }) ) .catch(error => scope.$emit('pdf:error', error)) }) } var elementTimer = null var updateLayout = function () { // if element is zero-sized keep checking until it is ready // console.log 'checking element ready', element.height(), element.width() if (element.height() === 0 || element.width() === 0) { if (elementTimer != null) { return } return (elementTimer = setTimeout(function () { elementTimer = null return updateLayout() }, 1000)) } else { scope.parentSize = [element.innerHeight(), element.innerWidth()] // console.log 'resolving layoutReady with', scope.parentSize return $timeout(function () { layoutReady.resolve(scope.parentSize) return scope.$emit('flash-controls') }) } } var layoutTimer = null const queueLayout = function () { // console.log 'call to queue layout' if (layoutTimer != null) { return } // console.log 'added to queue layoyt' layoutReady = $q.defer() return (layoutTimer = setTimeout(function () { // console.log 'calling update layout' updateLayout() // console.log 'setting layout timer to null' return (layoutTimer = null) }, 0)) } queueLayout() // scope.$on 'layout:pdf:view', (e, args) -> // console.log 'pdf view change', element, e, args // queueLayout() scope.$on('layout:main:resize', () => // console.log 'GOT LAYOUT-MAIN-RESIZE EVENT' queueLayout() ) scope.$on('layout:pdf:resize', () => // FIXME we get this event twice // also we need to start a new layout when we get it // console.log 'GOT LAYOUT-PDF-RESIZE EVENT' queueLayout() ) scope.$on('pdf:error', function (event, error) { if (error.name === 'RenderingCancelledException') { return } // check if too many retries or file is missing const message = (error != null ? error.message : undefined) || error if ( scope.loadCount > 3 || /^Missing PDF/i.test(message) || /^loading/i.test(message) ) { scope.$emit('pdf:error:display') return } if (scope.loadSuccess) { return ctrl .load() .then( () => // trigger a redraw (scope.scale = angular.copy(scope.scale)) ) .catch(error => scope.$emit('pdf:error:display')) } else { scope.$emit('pdf:error:display') } }) scope.$on('pdf:page:size-change', function (event, pageNum, delta) { // console.log 'page size change event', pageNum, delta const origposition = angular.copy(scope.position) // console.log 'orig position', JSON.stringify(origposition) if ( origposition != null && pageNum - 1 < origposition.page && delta !== 0 ) { const currentScrollTop = element.scrollTop() // console.log 'adjusting scroll from', currentScrollTop, 'by', delta scope.adjustingScroll = true return element.scrollTop(currentScrollTop + delta) } }) element.on('mousedown', function (e) { // We're checking that the event target isn't the directive root element // to make sure that the click was within a PDF page - no point in showing // the text layer when the click is outside. // If the user clicks a PDF page, the mousedown target will be the canvas // element (or the text layer one). Alternatively, if the event target is // the root element, we can assume that the user has clicked either the // grey background area or the scrollbars. if (e.target !== element[0] && !_hasSelection()) { element.addClass('pdfjs-viewer-show-text') return _setMouseUpHandler() } }) let mouseUpHandler = null // keep track of the handler to avoid adding multiple times var _setMouseUpHandler = function () { if (mouseUpHandler == null) { return (mouseUpHandler = $(document.body).one( 'mouseup', _handleSelectionMouseUp )) } } var _handleSelectionMouseUp = function () { mouseUpHandler = null // reset handler, has now fired window.setTimeout(function () { const removedClass = _removeClassIfNoSelection() // if we still have a selection we need to keep the handler going if (!removedClass) { return _setMouseUpHandler() } }, 10) return true } var _removeClassIfNoSelection = function () { if (_hasSelection()) { return false // didn't remove the text layer } else { element.removeClass('pdfjs-viewer-show-text') return true } } var _hasSelection = function () { const selection = typeof window.getSelection === 'function' ? window.getSelection() : undefined // check the selection collapsed state in preference to // using selection.toString() as the latter is "" when // the selection is hidden (e.g. while viewing logs) return ( selection != null && _isSelectionWithinPDF(selection) && !selection.isCollapsed ) } var _isSelectionWithinPDF = function (selection) { if (selection.rangeCount === 0) { return false } const selectionAncestorNode = selection.getRangeAt(0) .commonAncestorContainer return ( element.find(selectionAncestorNode).length > 0 || element.is(selectionAncestorNode) ) } element.on('scroll', function () { // console.log 'scroll event', element.scrollTop(), 'adjusting?', scope.adjustingScroll // scope.scrollPosition = element.scrollTop() if (scope.adjustingScroll) { renderVisiblePages() scope.adjustingScroll = false return } if (scope.scrollHandlerTimeout) { clearTimeout(scope.scrollHandlerTimeout) } return (scope.scrollHandlerTimeout = setTimeout(scrollHandler, 25)) }) var scrollHandler = function () { renderVisiblePages() const newPosition = ctrl.getPdfPosition() if (newPosition != null) { scope.position = newPosition } return (scope.scrollHandlerTimeout = null) } scope.$watch('pdfSrc', function (newVal, oldVal) { // console.log 'loading pdf', newVal, oldVal if (newVal == null) { return } scope.loadCount = 0 // new pdf, so reset load count scope.loadSuccess = false return ctrl .load() .then( () => // trigger a redraw (scope.scale = angular.copy(scope.scale)) ) .catch(error => scope.$emit('pdf:error', error)) }) scope.$watch('scale', function (newVal, oldVal) { // no need to set scale when initialising, done in pdfSrc if (newVal === oldVal) { return } // console.log 'XXX calling Setscale in scale watch' return queueRescale(newVal) }) scope.$watch('forceScale', function (newVal, oldVal) { // console.log 'got change in numscale watcher', newVal, oldVal if (newVal == null) { return } return queueRescale(newVal) }) // scope.$watch 'position', (newVal, oldVal) -> // console.log 'got change in position watcher', newVal, oldVal scope.$watch('forceCheck', function (newVal, oldVal) { // console.log 'forceCheck', newVal, oldVal if (newVal == null) { return } scope.adjustingScroll = true // temporarily disable scroll return queueRescale(scope.scale) }) scope.$watch( 'parentSize', function (newVal, oldVal) { // console.log 'XXX in parentSize watch', newVal, oldVal // if newVal == oldVal // console.log 'returning because old and new are the same' // return // return unless oldVal? // console.log 'XXX calling setScale in parentSize watcher' if (newVal == null) { return } return queueRescale(scope.scale) }, true ) // scope.$watch 'elementWidth', (newVal, oldVal) -> // console.log '*** watch INTERVAL element width is', newVal, oldVal scope.$watch('pleaseScrollTo', function (newVal, oldVal) { // console.log 'got request to ScrollTo', newVal, 'oldVal', oldVal if (newVal == null) { return } scope.adjustingScroll = true // temporarily disable scroll // handler while we reposition $(element).scrollTop(newVal) return (scope.pleaseScrollTo = undefined) }) scope.$watch('pleaseJumpTo', function (newPosition, oldPosition) { // console.log 'in pleaseJumpTo', newPosition, oldPosition if (newPosition == null) { return } return ctrl.setPdfPosition(scope.pages[newPosition.page - 1], newPosition) }) scope.$watch('navigateTo', function (newVal, oldVal) { if (newVal == null) { return } // console.log 'got request to navigate to', newVal, 'oldVal', oldVal scope.navigateTo = undefined // console.log 'navigate to', newVal // console.log 'look up page num' return scope.document.getDestination(newVal.dest).then(r => // console.log 'need to go to', r // console.log 'page ref is', r[0] scope.document.getPageIndex(r[0]).then(function (pidx) { // console.log 'page num is', pidx const page = scope.pages[pidx] return scope.document .getPdfViewport(page.pageNum) .then(function (viewport) { // console.log 'got viewport', viewport const coords = viewport.convertToViewportPoint(r[2], r[3]) // console.log 'viewport position', coords // console.log 'r is', r, 'r[1]', r[1], 'r[1].name', r[1].name if (r[1].name === 'XYZ') { // console.log 'XYZ:', r[2], r[3] const newPosition = { page: pidx, offset: { top: r[3], left: r[2] }, } return ctrl.setPdfPosition(scope.pages[pidx], newPosition) } }) }) ) }) // XXX? scope.$watch('highlights', function (areas) { // console.log 'got HIGHLIGHTS in pdfViewer', areas if (areas == null) { return } // console.log 'areas are', areas const highlights = Array.from(areas || []).map(area => ({ page: area.page - 1, highlight: { left: area.h, top: area.v, height: area.height, width: area.width, }, })) // console.log 'highlights', highlights if (!highlights.length) { return } scope.$broadcast('pdf:highlights', areas) const first = highlights[0] // switching between split and full pdf views can cause // highlights to appear before rendering if (!scope.pages) { return // ignore highlight scroll if still rendering } const pageNum = scope.pages[first.page] != null ? scope.pages[first.page].pageNum : undefined if (pageNum == null) { return // ignore highlight scroll if page not found } // use a visual offset of 72pt to match the offset in PdfController syncToCode return scope.document.getPdfViewport(pageNum).then(function (viewport) { const position = { page: first.page, offset: { left: first.highlight.left, top: viewport.viewBox[3] - first.highlight.top + first.highlight.height + 72, }, } return ctrl.setPdfPosition(scope.pages[first.page], position) }) }) return scope.$on('$destroy', function () { // console.log 'handle pdfng directive destroy' if (elementTimer != null) { clearTimeout(elementTimer) } if (layoutTimer != null) { clearTimeout(layoutTimer) } if (rescaleTimer != null) { clearTimeout(rescaleTimer) } if (spinnerTimer != null) { return clearTimeout(spinnerTimer) } }) }, })) function __range__(left, right, inclusive) { const range = [] const ascending = left < right const end = !inclusive ? right : ascending ? right + 1 : right - 1 for (let i = left; ascending ? i < end : i > end; ascending ? i++ : i--) { range.push(i) } return range } function __guard__(value, transform) { return typeof value !== 'undefined' && value !== null ? transform(value) : undefined }
overleaf/web/frontend/js/ide/pdfng/directives/pdfViewer.js/0
{ "file_path": "overleaf/web/frontend/js/ide/pdfng/directives/pdfViewer.js", "repo_id": "overleaf", "token_count": 12336 }
580
import _ from 'lodash' /* eslint-disable max-len, no-return-assign, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS205: Consider reworking code to avoid use of IIFEs * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ import App from '../../../base' export default App.directive('resolvedCommentsDropdown', () => ({ restrict: 'E', templateUrl: 'resolvedCommentsDropdownTemplate', scope: { entries: '=', threads: '=', resolvedIds: '=', docs: '=', permissions: '=', onOpen: '&', onUnresolve: '&', onDelete: '&', isLoading: '=', }, link(scope, element, attrs) { let filterResolvedComments scope.state = { isOpen: false } scope.toggleOpenState = function () { scope.state.isOpen = !scope.state.isOpen if (scope.state.isOpen) { return scope.onOpen().then(() => filterResolvedComments()) } } scope.resolvedComments = [] scope.handleUnresolve = function (threadId) { scope.onUnresolve({ threadId }) return (scope.resolvedComments = scope.resolvedComments.filter( c => c.threadId !== threadId )) } scope.handleDelete = function (entryId, docId, threadId) { scope.onDelete({ entryId, docId, threadId }) return (scope.resolvedComments = scope.resolvedComments.filter( c => c.threadId !== threadId )) } const getDocNameById = function (docId) { const doc = _.find(scope.docs, doc => doc.doc.id === docId) if (doc != null) { return doc.path } else { return null } } return (filterResolvedComments = function () { scope.resolvedComments = [] return (() => { const result = [] for (var docId in scope.entries) { var docEntries = scope.entries[docId] result.push( (() => { const result1 = [] for (const entryId in docEntries) { const entry = docEntries[entryId] if ( entry.type === 'comment' && (scope.threads[entry.thread_id] != null ? scope.threads[entry.thread_id].resolved : undefined) != null ) { const resolvedComment = angular.copy( scope.threads[entry.thread_id] ) resolvedComment.content = entry.content resolvedComment.threadId = entry.thread_id resolvedComment.entryId = entryId resolvedComment.docId = docId resolvedComment.docName = getDocNameById(docId) result1.push(scope.resolvedComments.push(resolvedComment)) } else { result1.push(undefined) } } return result1 })() ) } return result })() }) }, }))
overleaf/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js/0
{ "file_path": "overleaf/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js", "repo_id": "overleaf", "token_count": 1453 }
581
// fetch wrapper to make simple JSON requests: // - send the CSRF token in the request // - set the JSON content-type in the request headers // - throw errors on non-ok response // - parse JSON response body, unless response is empty import OError from '@overleaf/o-error' /** * @typedef {Object} FetchOptions * @extends RequestInit * @property {Object} body */ /** * @param {string} path * @param {FetchOptions} [options] */ export function getJSON(path, options) { return fetchJSON(path, { ...options, method: 'GET' }) } /** * @param {string} path * @param {FetchOptions} [options] */ export function postJSON(path, options) { return fetchJSON(path, { ...options, method: 'POST' }) } /** * @param {string} path * @param {FetchOptions} [options] */ export function putJSON(path, options) { return fetchJSON(path, { ...options, method: 'PUT' }) } /** * @param {string} path * @param {FetchOptions} [options] */ export function deleteJSON(path, options) { return fetchJSON(path, { ...options, method: 'DELETE' }) } export class FetchError extends OError { /** * @param {string} message * @param {string} url * @param {FetchOptions} [options] * @param {Response} [response] * @param {Object} [data] */ constructor(message, url, options, response, data) { super(message, { statusCode: response ? response.status : undefined }) this.url = url this.options = options this.response = response this.data = data } } /** * @param {string} path * @param {FetchOptions} [options] * * @return Promise<Object> */ function fetchJSON( path, { body = {}, headers = {}, method = 'GET', credentials = 'same-origin', ...otherOptions } ) { const options = { ...otherOptions, headers: { ...headers, 'Content-Type': 'application/json', 'X-Csrf-Token': window.csrfToken, Accept: 'application/json', }, credentials, method, } if (method !== 'GET' && method !== 'HEAD') { options.body = JSON.stringify(body) } // The returned Promise and the `.then(handleSuccess, handleError)` handlers are needed // to avoid calling `finally` in a Promise chain (and thus updating the component's state) // after a component has unmounted. // `resolve` will be called when the request succeeds, `reject` will be called when the request fails, // but nothing will be called if the request is cancelled via an AbortController. return new Promise((resolve, reject) => { fetch(path, options).then( response => { return parseResponseBody(response).then( data => { if (response.ok) { resolve(data) } else { // the response from the server was not 2xx reject( new FetchError( response.statusText, path, options, response, data ) ) } }, error => { // parsing the response body failed reject( new FetchError( 'There was an error parsing the response body', path, options, response ).withCause(error) ) } ) }, error => { // swallow the error if the fetch was cancelled (e.g. by cancelling an AbortController on component unmount) if (error.name !== 'AbortError') { // the fetch failed reject( new FetchError( 'There was an error fetching the JSON', path, options ).withCause(error) ) } } ) }) } /** * @param {Response} response * @returns {Promise<Object>} */ async function parseResponseBody(response) { const contentType = response.headers.get('Content-Type') if (/application\/json/.test(contentType)) { return response.json() } if (/text\/plain/.test(contentType)) { const message = await response.text() return { message } } if (/text\/html/.test(contentType)) { const message = await response.text() // only use HTML responses which don't start with `<` if (!/^\s*</.test(message)) { return { message } } } // response body ignored as content-type is either not set (e.g. 204 // responses) or unsupported return {} }
overleaf/web/frontend/js/infrastructure/fetch-json.js/0
{ "file_path": "overleaf/web/frontend/js/infrastructure/fetch-json.js", "repo_id": "overleaf", "token_count": 1795 }
582
/* eslint-disable no-return-assign, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ import App from '../base' App.controller( 'BonusLinksController', ($scope, $modal) => ($scope.openLinkToUsModal = () => $modal.open({ templateUrl: 'BonusLinkToUsModal', controller: 'BonusModalController', })) ) export default App.controller( 'BonusModalController', ($scope, $modalInstance) => ($scope.cancel = () => $modalInstance.dismiss()) )
overleaf/web/frontend/js/main/bonus.js/0
{ "file_path": "overleaf/web/frontend/js/main/bonus.js", "repo_id": "overleaf", "token_count": 252 }
583
/* eslint-disable camelcase */ import App from '../../../base' export default App.service('ProjectListService', function () { return { getOwnerName(project) { if (project.accessLevel === 'owner') { return 'You' } else if (project.owner != null) { return this.getUserName(project.owner) } else { return 'None' } }, getUserName(user) { if (user && user._id === window.user_id) { return 'You' } else if (user) { const { first_name, last_name, email } = user if (first_name || last_name) { return [first_name, last_name].filter(n => n != null).join(' ') } else if (email) { return email } else { return 'An Overleaf v1 User' } } else { return 'None' } }, } })
overleaf/web/frontend/js/main/project-list/services/project-list.js/0
{ "file_path": "overleaf/web/frontend/js/main/project-list/services/project-list.js", "repo_id": "overleaf", "token_count": 387 }
584
import _ from 'lodash' import App from '../base' import AlgoliaSearch from 'algoliasearch' import getMeta from '../utils/meta' export default App.factory('algoliaSearch', function () { let wikiIdx const algoliaConfig = getMeta('ol-algolia') const wikiIndex = _.get(algoliaConfig, 'indexes.wiki') if (wikiIndex) { const client = AlgoliaSearch(algoliaConfig.appId, algoliaConfig.apiKey) wikiIdx = client.initIndex(wikiIndex) } const service = { searchWiki: wikiIdx ? wikiIdx.search.bind(wikiIdx) : null, } return service })
overleaf/web/frontend/js/services/algolia-search.js/0
{ "file_path": "overleaf/web/frontend/js/services/algolia-search.js", "repo_id": "overleaf", "token_count": 194 }
585
import { createContext, useCallback, useContext, useEffect, useMemo, } from 'react' import PropTypes from 'prop-types' import useScopeValue from './util/scope-value-hook' import useBrowserWindow from '../hooks/use-browser-window' import { useIdeContext } from './ide-context' import { useProjectContext } from './project-context' export const EditorContext = createContext() EditorContext.Provider.propTypes = { value: PropTypes.shape({ cobranding: PropTypes.shape({ logoImgUrl: PropTypes.string.isRequired, brandVariationName: PropTypes.string.isRequired, brandVariationId: PropTypes.number.isRequired, brandId: PropTypes.number.isRequired, brandVariationHomeUrl: PropTypes.string.isRequired, publishGuideHtml: PropTypes.string, partner: PropTypes.string, brandedMenu: PropTypes.bool, submitBtnHtml: PropTypes.string, }), hasPremiumCompile: PropTypes.bool, loading: PropTypes.bool, renameProject: PropTypes.func.isRequired, isProjectOwner: PropTypes.bool, isRestrictedTokenMember: PropTypes.bool, rootFolder: PropTypes.shape({ children: PropTypes.arrayOf(PropTypes.shape({ type: PropTypes.string })), }), permissionsLevel: PropTypes.oneOf(['readOnly', 'readAndWrite', 'owner']), }), } export function EditorProvider({ children, settings }) { const ide = useIdeContext() const { owner, features } = useProjectContext({ owner: PropTypes.shape({ _id: PropTypes.string.isRequired, }), features: PropTypes.shape({ compileGroup: PropTypes.string, }), }) const cobranding = useMemo(() => { if (window.brandVariation) { return { logoImgUrl: window.brandVariation.logo_url, brandVariationName: window.brandVariation.name, brandVariationId: window.brandVariation.id, brandId: window.brandVariation.brand_id, brandVariationHomeUrl: window.brandVariation.home_url, publishGuideHtml: window.brandVariation.publish_guide_html, partner: window.brandVariation.partner, brandedMenu: window.brandVariation.branded_menu, submitBtnHtml: window.brandVariation.submit_button_html, } } else { return undefined } }, []) const [loading] = useScopeValue('state.loading') const [projectName, setProjectName] = useScopeValue('project.name') const [rootFolder] = useScopeValue('rootFolder') const [permissionsLevel] = useScopeValue('permissionsLevel') useEffect(() => { if (ide?.socket) { ide.socket.on('projectNameUpdated', setProjectName) return () => ide.socket.removeListener('projectNameUpdated', setProjectName) } }, [ide?.socket, setProjectName]) const renameProject = useCallback( newName => { setProjectName(oldName => { if (oldName !== newName) { settings.saveProjectSettings({ name: newName }).catch(response => { setProjectName(oldName) const { data, status } = response if (status === 400) { return ide.showGenericMessageModal('Error renaming project', data) } else { return ide.showGenericMessageModal( 'Error renaming project', 'Please try again in a moment' ) } }) } return newName }) }, [settings, ide, setProjectName] ) const { setTitle } = useBrowserWindow() useEffect(() => { setTitle( `${projectName ? projectName + ' - ' : ''}Online LaTeX Editor ${ window.ExposedSettings.appName }` ) }, [projectName, setTitle]) const value = useMemo( () => ({ cobranding, hasPremiumCompile: features?.compileGroup === 'priority', loading, renameProject, permissionsLevel, isProjectOwner: owner?._id === window.user.id, isRestrictedTokenMember: window.isRestrictedTokenMember, rootFolder, }), [ cobranding, features?.compileGroup, loading, renameProject, permissionsLevel, owner?._id, rootFolder, ] ) return ( <EditorContext.Provider value={value}>{children}</EditorContext.Provider> ) } EditorProvider.propTypes = { children: PropTypes.any, settings: PropTypes.any.isRequired, } export function useEditorContext(propTypes) { const context = useContext(EditorContext) if (!context) { throw new Error('useEditorContext is only available inside EditorProvider') } PropTypes.checkPropTypes(propTypes, context, 'data', 'EditorContext.Provider') return context }
overleaf/web/frontend/js/shared/context/editor-context.js/0
{ "file_path": "overleaf/web/frontend/js/shared/context/editor-context.js", "repo_id": "overleaf", "token_count": 1764 }
586
import md5 from 'crypto-js/md5' const ANONYMOUS_HUE = 100 const OWN_HUE = 200 // We will always appear as this color to ourselves const OWN_HUE_BLOCKED_SIZE = 20 // no other user should have a HUE in this range const TOTAL_HUES = 360 // actually 361, but 360 for legacy reasons export function getHueForUserId(userId, currentUserId) { if (userId == null || userId === 'anonymous-user') { return ANONYMOUS_HUE } if (currentUserId === userId) { return OWN_HUE } let hue = getHueForId(userId) // if `hue` is within `OWN_HUE_BLOCKED_SIZE` degrees of the personal hue // (`OWN_HUE`), shift `hue` to the end of available hues by adding if ( hue > OWN_HUE - OWN_HUE_BLOCKED_SIZE && hue < OWN_HUE + OWN_HUE_BLOCKED_SIZE ) { hue = hue - OWN_HUE // `hue` now at 0 +/- `OWN_HUE_BLOCKED_SIZE` hue = hue + TOTAL_HUES - OWN_HUE_BLOCKED_SIZE } return hue } function getHueForId(id) { const hash = md5(id) const hue = parseInt(hash.toString().slice(0, 8), 16) % (TOTAL_HUES - OWN_HUE_BLOCKED_SIZE * 2) return hue }
overleaf/web/frontend/js/shared/utils/colors.js/0
{ "file_path": "overleaf/web/frontend/js/shared/utils/colors.js", "repo_id": "overleaf", "token_count": 424 }
587
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
overleaf/web/frontend/js/vendor/libs/pdfjs-dist/build/LICENSE/0
{ "file_path": "overleaf/web/frontend/js/vendor/libs/pdfjs-dist/build/LICENSE", "repo_id": "overleaf", "token_count": 2856 }
588
import { v4 as uuid } from 'uuid' import { ContextRoot } from '../js/shared/context/root-context' import ChatPane from '../js/features/chat/components/chat-pane' import { stubMathJax } from '../../test/frontend/features/chat/components/stubs' import { setupContext } from './fixtures/context' import useFetchMock from './hooks/use-fetch-mock' const ONE_MINUTE = 60 * 1000 const user = { id: 'fake_user', first_name: 'mortimer', email: 'fake@example.com', } const user2 = { id: 'another_fake_user', first_name: 'leopold', email: 'another_fake@example.com', } function generateMessages(count) { const messages = [] let timestamp = new Date().getTime() // newest message goes first for (let i = 0; i <= count; i++) { const author = Math.random() > 0.5 ? user : user2 // modify the timestamp so the previous message has 70% chances to be within 5 minutes from // the current one, for grouping purposes timestamp -= (4.3 + Math.random()) * ONE_MINUTE messages.push({ id: uuid(), content: `message #${i}`, user: author, timestamp, }) } return messages } stubMathJax() setupContext() export const Conversation = args => { useFetchMock(fetchMock => { fetchMock.get(/messages/, generateMessages(35)).post(/messages/, {}) }) return <ChatPane {...args} /> } export const NoMessages = args => { useFetchMock(fetchMock => { fetchMock.get(/messages/, []) }) return <ChatPane {...args} /> } export const Loading = args => { useFetchMock(fetchMock => { fetchMock.get(/messages/, generateMessages(6), { delay: 1000 * 10, }) }) return <ChatPane {...args} /> } export default { title: 'Chat', component: ChatPane, argTypes: { resetUnreadMessages: { action: 'resetUnreadMessages' }, }, args: { resetUnreadMessages: () => {}, }, decorators: [ Story => ( <> <style>{'html, body, .chat { height: 100%; width: 100%; }'}</style> <ContextRoot ide={window._ide} settings={{}}> <Story /> </ContextRoot> </> ), ], }
overleaf/web/frontend/stories/chat.stories.js/0
{ "file_path": "overleaf/web/frontend/stories/chat.stories.js", "repo_id": "overleaf", "token_count": 807 }
589
import { ModalFooterDecorator, ModalContentDecorator, } from '../modal-decorators' import { FileTreeModalCreateFileFooterContent } from '../../../js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer' export const Valid = args => <FileTreeModalCreateFileFooterContent {...args} /> export const Invalid = args => ( <FileTreeModalCreateFileFooterContent {...args} /> ) Invalid.args = { valid: false, } export const Inflight = args => ( <FileTreeModalCreateFileFooterContent {...args} /> ) Inflight.args = { inFlight: true, } export const FileLimitWarning = args => ( <FileTreeModalCreateFileFooterContent {...args} /> ) FileLimitWarning.args = { fileCount: { status: 'warning', value: 1990, limit: 2000, }, } export const FileLimitError = args => ( <FileTreeModalCreateFileFooterContent {...args} /> ) FileLimitError.args = { fileCount: { status: 'error', value: 2000, limit: 2000, }, } export default { title: 'Modals / Create File / Footer', component: FileTreeModalCreateFileFooterContent, args: { fileCount: { status: 'success', limit: 10, value: 1, }, valid: true, inFlight: false, newFileCreateMode: 'doc', }, argTypes: { cancel: { action: 'cancel' }, }, decorators: [ModalFooterDecorator, ModalContentDecorator], }
overleaf/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js/0
{ "file_path": "overleaf/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js", "repo_id": "overleaf", "token_count": 501 }
590
@import 'app/sidebar-v2-dash-pane.less'; @import 'app/front-chat-widget.less'; @import 'app/ol-chat.less'; @import 'app/templates-v2.less'; @import 'app/login-register.less'; @import 'app/review-features-page.less'; @import 'app/institution-hub.less'; @import 'app/publisher-hub.less'; @import 'app/admin-hub.less'; @import 'app/import.less'; @import 'components/lists.less'; @import 'components/overbox.less';
overleaf/web/frontend/stylesheets/_ol_style_includes.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/_ol_style_includes.less", "repo_id": "overleaf", "token_count": 156 }
591
.fake-full-width-bg(@bg-color) { &::before { content: '\00a0'; position: absolute; width: 100%; right: 100%; background-color: @bg-color; } } .editor-sidebar { display: flex; flex-direction: column; background-color: @file-tree-bg; } .file-tree { display: flex !important; // To work around jQuery layout's inline styles flex-direction: column; flex-grow: 1; max-height: 100%; .toolbar.toolbar-filetree { .toolbar-small-mixin; .toolbar-alt-mixin; padding: 0 5px; flex-shrink: 0; } > file-tree-root, .file-tree-inner { position: relative; display: flex; flex-direction: column; flex-grow: 1; overflow-y: auto; width: inherit; height: inherit; &.no-toolbar { top: 0; } } // TODO; Consolidate with "Project files" in Overleaf h3 { font-size: 1rem; border-bottom: 1px solid @gray; padding-bottom: (@line-height-computed / 4); margin: (@line-height-computed / 2); } &-history { .entity-name { padding-left: 6px; &.deleted { text-decoration: line-through; } } .loading { padding-left: 6px; color: #fff; i.fa { color: #fff; } } } li.dnd-droppable-hover .entity-name, li .entity-name.droppable-hover { font-weight: bold; background-color: @file-tree-item-hover-bg; .fake-full-width-bg(@file-tree-item-hover-bg); } ul.droppable-hover li div.entity-name:hover { background-color: transparent; .fake-full-width-bg(transparent); &.droppable-hover { background-color: @file-tree-item-hover-bg; .fake-full-width-bg(@file-tree-item-hover-bg); } } ul.file-tree-list { margin: 0; overflow-x: hidden; height: 100%; flex-grow: 1; position: relative; overflow-y: auto; .entity > ul, ul[role='tree'] { margin-left: (@line-height-computed / 2); } li.bottom-buffer { min-height: @line-height-computed; } li { line-height: @file-tree-line-height; position: relative; &:focus { outline: none; } .entity { user-select: none; &:focus { outline: none; } } .entity > .entity-name > button { background-color: transparent; border: 0; padding: 0; &:focus { outline: none; } &.item-name-button { width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; padding-right: 32px; } } .entity-name { color: @file-tree-item-color; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; &.entity-name-react { text-overflow: clip; } &:focus { outline: none; } &:hover { background-color: @file-tree-item-hover-bg; } &:hover { // When the entity is a subfolder, the DOM element is "indented" via margin-left. This makes the // element not fill the entire file-tree width (as it's spaced from the left-hand side via margin) // and, in consequence, the background gets clipped. The ::before pseudo-selector is used to fill // the empty space. .fake-full-width-bg(@file-tree-item-hover-bg); } input { line-height: 1.6; } .dropdown-toggle > i { color: white; font-size: 18px; } } .entity.dnd-draggable-dragging { .entity-name:hover { background-color: transparent; .fake-full-width-bg(transparent); } } i.fa { color: @file-tree-item-icon-color; font-size: 14px; &.linked-file-highlight { & { color: white; } position: relative; top: 4px; left: -8px; font-size: 12px; } } i.fa-folder-open, i.fa-folder { color: @file-tree-item-folder-color; font-size: 14px; } i.spaced { margin-left: 18px; } i.toggle { width: 24px; padding: 6px; font-size: 16px; color: @file-tree-item-toggle-color; } .file-tree-dropdown-toggle { display: flex; align-items: center; color: #fff; line-height: 1.6; font-size: 20px; padding: 0 4px 0 18px; &:hover, &:focus { text-decoration: none; } &::before { content: '\00B7\00B7\00B7'; transform: rotate(90deg); letter-spacing: 0.5px; } } &.multi-selected { > .entity { > .entity-name { > div > i.fa, > button > i.fa, > i.fa, .entity-menu-toggle i.fa { color: #fff; } > i.fa i.linked-file-highlight { color: @blue; } color: #fff; font-weight: bold; background-color: @file-tree-multiselect-bg; .fake-full-width-bg(@file-tree-multiselect-bg); &:hover { background-color: @file-tree-multiselect-hover-bg; .fake-full-width-bg(@file-tree-multiselect-hover-bg); } } } } .dropdown { position: absolute; right: 0; } .rename-input { display: block; position: absolute; top: 1px; left: 44px; right: 32px; color: @file-tree-item-input-color; input { width: 100%; } } > .entity > .entity-name { .entity-menu-toggle { display: none; } } .entity-limit-hit { color: @file-tree-item-color; line-height: 2.05; margin-left: (@line-height-computed / 2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .entity-limit-hit-message { font-style: italic; } i.fa.entity-limit-hit-tooltip-trigger { margin-left: (@line-height-computed / 4); cursor: pointer; } } } &:not(.multi-selected) { ul.file-tree-list li.selected { > .entity { > .entity-name { color: @file-tree-item-selected-color; > div > i.fa, > button > i.fa, > i.fa, .entity-menu-toggle i.fa { color: @file-tree-item-selected-color; } > i.fa i.linked-file-highlight { color: @blue; } background-color: @file-tree-item-selected-bg; font-weight: bold; padding-right: 32px; .fake-full-width-bg(@file-tree-item-selected-bg); .entity-menu-toggle { display: inline-block; } } } } ul.file-tree-list li.selected.dnd-droppable-hover { > .entity { > .entity-name { background-color: @file-tree-item-hover-bg; .fake-full-width-bg(@file-tree-item-hover-bg); } } } } .dnd-draggable-preview-layer { position: absolute; pointer-events: none; z-index: 100; width: 100%; height: 100%; overflow: hidden; &.dnd-droppable-hover { border: 3px solid @file-tree-item-selected-bg; } } .dnd-draggable-preview-item, .ui-draggable-dragging { background-color: fade(@file-tree-item-selected-bg, 60%); color: @file-tree-item-selected-color; width: 75%; padding-left: @line-height-computed; } .dnd-draggable-preview-item { line-height: @file-tree-line-height; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .disconnected-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; background: @file-tree-bg; opacity: 0.5; cursor: wait; } } .modal-new-file { padding: 0; table { width: 100%; td { vertical-align: top; } } /* old modal */ .toggle-output-files-button { font-size: 80%; } /* new modal */ .toggle-file-type-button { font-size: 80%; margin-top: -12px; .btn { display: inline-block; padding: 0; vertical-align: baseline; font-size: inherit; } .btn:focus-within { outline: none; text-decoration: none; } } } .modal-new-file--list { background-color: @modal-footer-background-color; width: 220px; ul { li { /* old modal (a) */ a { color: @text-color; padding: (@line-height-computed / 4); display: block; text-decoration: none; } /* new modal (button) */ .btn { color: @text-color; padding: (@line-height-computed / 4); } .btn:hover { text-decoration: none; } .btn:focus { outline: none; text-decoration: none; background-color: white; } } li.active { background-color: white; /* old modal (a) */ a { color: @link-color; } /* new modal (button) */ .btn { color: @link-color; text-decoration: none; } } li:hover { background-color: white; } } } .file-tree-error { text-align: center; color: @file-tree-error-color; padding: 20px; } .file-tree-modal-alert { margin-top: 10px; margin-bottom: 0px; } .btn.modal-new-file-mode { text-align: left; } .modal-new-file--body { padding: 20px; padding-top: (@line-height-computed / 4); } .modal-new-file--body-upload { padding-top: 20px; } .modal-footer { .approaching-file-limit { font-weight: bold; } .at-file-limit { text-align: left; } } .modal-new-file--body-upload .uppy-Root { font-family: inherit; } .modal-new-file--body-upload .uppy-size--md { .uppy-Dashboard-AddFiles-title { font-size: inherit; } }
overleaf/web/frontend/stylesheets/app/editor/file-tree.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/app/editor/file-tree.less", "repo_id": "overleaf", "token_count": 5135 }
592
.symbol-palette-container { height: 100%; } .symbol-palette { display: flex; flex-direction: column; background: @symbol-palette-bg; color: @symbol-palette-color; width: 100%; height: 100%; } .symbol-palette-header { flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; font-family: @font-family-sans-serif; font-size: 16px; background: @symbol-palette-header-background; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); } .symbol-palette-header .beta-badge { margin-right: @margin-xs; margin-left: @margin-xs; } .symbol-palette-search-hint { padding-left: @padding-xs; margin-left: @margin-xs; } .symbol-palette-tab-list[data-reach-tab-list] { background: none; border-bottom: none; flex-wrap: wrap; } .symbol-palette-tab[data-reach-tab][data-selected] { background: @symbol-palette-selected-tab-bg; color: @symbol-palette-selected-tab-color; border-bottom-color: transparent; } .symbol-palette-body { flex: 1; overflow-y: auto; } .symbol-palette-items { display: flex; flex-wrap: wrap; padding: @padding-xs; } .symbol-palette-item { font-family: 'Stix Two Math', serif; font-size: 24px; line-height: 42px; height: 42px; width: 42px; margin: @margin-xs; color: @symbol-palette-item-color; background: @symbol-palette-item-bg; border: 1px solid transparent; border-radius: @border-radius-base; display: inline-flex; align-items: center; justify-content: center; } .symbol-palette-item-command { font-family: monospace; font-weight: bold; } .symbol-palette-item-notes { margin-top: @margin-xs; } .symbol-palette-empty { display: flex; align-items: center; justify-content: center; padding: @padding-sm; } .symbol-palette-search { padding: 2px @padding-sm; margin: @margin-xs; line-height: 1; height: auto; width: auto; } .symbol-palette-header-group { display: flex; align-items: center; white-space: nowrap; margin-left: @margin-xs; } .symbol-palette-info-link, .symbol-palette-info-link:focus, .symbol-palette-info-link:hover { color: inherit; }
overleaf/web/frontend/stylesheets/app/editor/symbol-palette.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/app/editor/symbol-palette.less", "repo_id": "overleaf", "token_count": 854 }
593
.plans { p { color: @gray-dark; margin-bottom: @line-height-computed; } .best-value { color: @brand-secondary; line-height: @line-height-computed; text-transform: capitalize; } blockquote { footer { /* accessibility fix */ color: @gray-med; } } .btn-header { font-family: @font-family-sans-serif; margin-left: 10px; margin-top: -10px; text-shadow: 0 0 0; } .card .btn { white-space: normal; } .card.features { margin-top: @line-height-computed; i { color: @red; } p { margin: 0; } } .btn-header { font-family: @font-family-sans-serif; margin-left: 10px; margin-top: -10px; text-shadow: 0 0 0; } .card .btn { white-space: normal; } .card-group { .card-highlighted { padding-top: @line-height-computed * 2; padding-bottom: @line-height-computed * 2; } } .card-first, .card-last { background: @plans-non-highlighted; } .card-highlighted { border: @border-width-base solid @border-color-base; padding-top: 10px !important; .best-value { margin-bottom: 15px; } .card-header { padding-bottom: 22px; /* align hr with other plans */ } } .card-header { margin-bottom: 15px; } .circle { font-size: 1.5rem; font-weight: 700; padding: 46px 18px; margin: 0 auto @line-height-computed; text-shadow: 0 -1px 1px darken(@link-color, 10%); width: 120px; height: 120px; border-radius: 50%; background-color: @brand-secondary; color: white; white-space: nowrap; line-height: 1; span.small { color: rgba(255, 255, 255, 0.85); font-size: @font-size-base * 0.8; } } .circle-lg { width: 150px; height: 150px; padding-top: 50px; } .circle-subtext { font-size: 1rem; } .circle-img { float: right; } .faq { p { margin: 0; } } .header-with-btn { line-height: 1.6; } .plans-header { h1, h2, p { text-shadow: 0 -1px 1px white; } h1, h2 { color: @red; } p { margin-bottom: 0; } } .plans-subheader { margin-bottom: @line-height-computed; } .tagline { margin-bottom: 20px; } ul.nav-pills { text-align: center; margin-bottom: @line-height-computed; li { float: none; display: inline-block; } > li + li { margin-left: @line-height-computed / 2; } } } #changePlanSection { padding-top: 30px; .changePlanButton { padding-top: 15px; } } .paymentPageFeatures { h1, h2, h3 { color: @gray-dark; } h3 { font-size: 18px; &:first-child { margin-top: 0; } } p { font-size: 14px; color: @gray; } .small { font-size: 12px; } } .plansPageStudentLink { margin-left: 20px; margin-top: 20px; } /** Plans Test */ @best-val-height: 35px; @border-width-base: 3px; @gray-med: #6d6d6d; /* Media Queries */ @media (max-width: @screen-sm-max) { .plans { .card-group { /*override style in cards.less */ .card { margin-left: 0; margin-right: 0; } .card-highlighted { margin-top: @line-height-computed!important; } } .circle-img { float: left; margin: 0 15px; } ul.nav-pills { margin-bottom: @margin-xs; li { margin-bottom: @margin-sm; } } } } @media (min-width: @screen-md-min) { .plans { blockquote { margin-bottom: 0; } .faq { .row:nth-child(2) { h3 { margin-top: 0; } } } .top-switch { .currency-dropdown { margin-right: -15px; } } } } .student-disclaimer { font-size: 14px; /* match .paymentPageFeatures p */ color: @gray; /* match .paymentPageFeatures p */ margin: 12.5px 0 0 0; } /** Plans Table */ .plans-table { border: 1px solid @gray-lighter; background-color: @plans-non-highlighted; margin: @best-val-height 0 15px 0; table-layout: fixed; width: 100%; th, td { -moz-background-clip: padding; -webkit-background-clip: padding; background-clip: padding-box; /* needed for firefox when there is bg color */ border: 1px solid @gray-lighter; padding: 6px; text-align: center; vertical-align: middle; } td { font-weight: bold; } th { border-top: 0; font-family: @headings-font-family; font-size: @font-size-h2; font-weight: @headings-font-weight; hyphens: auto; line-height: @headings-line-height; padding: 18px; } th:first-child, td:first-child { border-left: 0; } th:last-child, td:last-child { border-right: 0; } td:first-child { font-weight: bold; padding-left: 18px; text-align: left; } tr:first-child { th { position: relative; /* keep here position here, otherwise messes up border on safari */ } } tr:last-child { td { border-bottom: 0; padding: 18px; } td:first-child { border: 0; } } .fa-check { color: @green; } /* accessibility fixes */ .small { color: @gray-med; } .outer { left: -@border-width-base; right: -@border-width-base; position: absolute; .outer-content { background: white; border: @border-width-base solid @border-color-base; border-radius: @border-radius-base; font-size: @font-size-base; font-family: @font-family-sans-serif; font-weight: bold; height: @best-val-height; padding-top: 10px; } } .outer.outer-top { top: -@best-val-height; .outer-content { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; } } .outer.outer-btm { bottom: -@best-val-height / 2; .outer-content { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; height: @best-val-height / 2; } } @media (min-width: @screen-sm-min) { /* highlight rows on hover */ tr:hover { td { background-color: @table-hover-bg; } } tr:first-child:hover { background-color: transparent; } tr:last-child:hover { background-color: transparent; td { background-color: transparent; } } } /* tooltip */ sup { color: @brand-secondary; cursor: pointer; margin-left: 5px; } .tooltip.in { min-width: 200px; } /* Media Queries */ @media (max-width: @screen-sm-max) { font-size: @font-size-small; hyphens: auto; margin-top: @best-val-height*2; th { font-size: @font-size-base; padding-left: @padding-xs; padding-right: @padding-xs; } td:first-child { padding-left: @padding-xs; } tr:last-child { td { padding: @padding-xs; .btn { word-break: normal; } } } .best-value { line-height: 1; } .btn { font-size: @font-size-small; } } @media screen and (max-width: @screen-xs-max) { tbody, thead { display: block; } tr { display: flex; flex-flow: row wrap; justify-content: space-around; } th { font-size: 12px; } /* hide the first column header */ tr:first-child { th:first-child { display: none; } } /* make the first column into a row */ td:first-child { text-align: center; background: @gray-lightest; width: 100%; } } } .plans-table-main { td:nth-child(4), th:nth-child(4) { background-color: white; border-left: @border-width-base solid @border-color-base; border-right: @border-width-base solid @border-color-base; } tr:last-child { /* highlighted column */ td:nth-child(4) { position: relative; /* keep here position here, otherwise messes up border on safari when there is a bg color */ &:before { /* needed for safafi */ border-top: 1px solid @border-color-base; content: ''; left: 0; position: absolute; top: -1px; width: 100%; } } } @media screen and (max-width: @screen-xs-max) { td, th { display: block; width: 25%; } } } .plans-table-student { td:nth-child(3), th:nth-child(3) { background-color: white; border-left: @border-width-base solid @border-color-base; border-right: @border-width-base solid @border-color-base; } tr:last-child { /* highlighted column */ td:nth-child(3) { position: relative; /* keep here position here, otherwise messes up border on safari when there is a bg color */ &:before { /* needed for safafi */ border-top: 1px solid @border-color-base; content: ''; left: 0; position: absolute; top: -1px; width: 100%; } } } @media screen and (max-width: @screen-xs-max) { td, th { display: block; width: 33.3%; } } }
overleaf/web/frontend/stylesheets/app/plans.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/app/plans.less", "repo_id": "overleaf", "token_count": 4303 }
594
.info-badge, .beta-badge { display: inline-block; width: @line-height-computed * 0.75; height: @line-height-computed * 0.75; line-height: @line-height-computed * 0.75; text-align: center; color: #fff; &:hover, &:focus { color: #fff; text-decoration: none; } } .info-badge { background-color: @info-badge-bg; border-radius: @line-height-computed * 0.75; font-family: @font-family-serif; font-style: italic; &::before { content: 'i'; } } .info-badge-fade-bg { .info-badge; background-color: rgba(0, 0, 0, 0.25); } .beta-badge { background-color: @orange; border-radius: @border-radius-base; &::before { content: 'β'; } }
overleaf/web/frontend/stylesheets/components/beta-badges.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/components/beta-badges.less", "repo_id": "overleaf", "token_count": 299 }
595
.hover-container { .show-on-hover { display: none; } &:hover { .show-on-hover { display: initial; } } }
overleaf/web/frontend/stylesheets/components/hover.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/components/hover.less", "repo_id": "overleaf", "token_count": 63 }
596
/* nvd3 version 1.8.4 (https://github.com/novus/nvd3) 2016-07-03 */ .nvd3 .nv-axis { pointer-events: none; opacity: 1; } .nvd3 .nv-axis path { fill: none; stroke: #000; stroke-opacity: 0.75; shape-rendering: crispEdges; } .nvd3 .nv-axis path.domain { stroke-opacity: 0.75; } .nvd3 .nv-axis.nv-x path.domain { stroke-opacity: 0; } .nvd3 .nv-axis line { fill: none; stroke: #e5e5e5; shape-rendering: crispEdges; } .nvd3 .nv-axis .zero line, /*this selector may not be necessary*/ .nvd3 .nv-axis line.zero { stroke-opacity: 0.75; } .nvd3 .nv-axis .nv-axisMaxMin text { font-weight: bold; } .nvd3 .x .nv-axis .nv-axisMaxMin text, .nvd3 .x2 .nv-axis .nv-axisMaxMin text, .nvd3 .x3 .nv-axis .nv-axisMaxMin text { text-anchor: middle; } .nvd3 .nv-axis.nv-disabled { opacity: 0; } .nvd3 .nv-bars rect { fill-opacity: 0.75; transition: fill-opacity 250ms linear; -moz-transition: fill-opacity 250ms linear; -webkit-transition: fill-opacity 250ms linear; } .nvd3 .nv-bars rect.hover { fill-opacity: 1; } .nvd3 .nv-bars .hover rect { fill: lightblue; } .nvd3 .nv-bars text { fill: rgba(0, 0, 0, 0); } .nvd3 .nv-bars .hover text { fill: rgba(0, 0, 0, 1); } .nvd3 .nv-multibar .nv-groups rect, .nvd3 .nv-multibarHorizontal .nv-groups rect, .nvd3 .nv-discretebar .nv-groups rect { stroke-opacity: 0; transition: fill-opacity 250ms linear; -moz-transition: fill-opacity 250ms linear; -webkit-transition: fill-opacity 250ms linear; } .nvd3 .nv-multibar .nv-groups rect:hover, .nvd3 .nv-multibarHorizontal .nv-groups rect:hover, .nvd3 .nv-candlestickBar .nv-ticks rect:hover, .nvd3 .nv-discretebar .nv-groups rect:hover { fill-opacity: 1; } .nvd3 .nv-discretebar .nv-groups text, .nvd3 .nv-multibarHorizontal .nv-groups text { font-weight: bold; fill: rgba(0, 0, 0, 1); stroke: rgba(0, 0, 0, 0); } /* boxplot CSS */ .nvd3 .nv-boxplot circle { fill-opacity: 0.5; } .nvd3 .nv-boxplot circle:hover { fill-opacity: 1; } .nvd3 .nv-boxplot rect:hover { fill-opacity: 1; } .nvd3 line.nv-boxplot-median { stroke: black; } .nv-boxplot-tick:hover { stroke-width: 2.5px; } /* bullet */ .nvd3.nv-bullet { font: 10px sans-serif; } .nvd3.nv-bullet .nv-measure { fill-opacity: 0.8; } .nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; } .nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; } .nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; } .nvd3.nv-bullet .nv-markerLine { stroke: #000; stroke-width: 1.5px; } .nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: 0.5px; } .nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; } .nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; } .nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; } .nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; } .nvd3.nv-bullet .nv-subtitle { fill: #999; } .nvd3.nv-bullet .nv-range { fill: #bababa; fill-opacity: 0.4; } .nvd3.nv-bullet .nv-range:hover { fill-opacity: 0.7; } .nvd3.nv-candlestickBar .nv-ticks .nv-tick { stroke-width: 1px; } .nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover { stroke-width: 2px; } .nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect { stroke: #2ca02c; fill: #2ca02c; } .nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect { stroke: #d62728; fill: #d62728; } .with-transitions .nv-candlestickBar .nv-ticks .nv-tick { transition: stroke-width 250ms linear, stroke-opacity 250ms linear; -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; } .nvd3.nv-candlestickBar .nv-ticks line { stroke: #333; } .nv-force-node { stroke: #fff; stroke-width: 1.5px; } .nv-force-link { stroke: #999; stroke-opacity: 0.6; } .nv-force-node text { stroke-width: 0px; } .nvd3 .nv-legend .nv-disabled rect { /*fill-opacity: 0;*/ } .nvd3 .nv-check-box .nv-box { fill-opacity: 0; stroke-width: 2; } .nvd3 .nv-check-box .nv-check { fill-opacity: 0; stroke-width: 4; } .nvd3 .nv-series.nv-disabled .nv-check-box .nv-check { fill-opacity: 0; stroke-opacity: 0; } .nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check { opacity: 0; } /* line plus bar */ .nvd3.nv-linePlusBar .nv-bar rect { fill-opacity: 0.75; } .nvd3.nv-linePlusBar .nv-bar rect:hover { fill-opacity: 1; } .nvd3 .nv-groups path.nv-line { fill: none; } .nvd3 .nv-groups path.nv-area { stroke: none; } .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { fill-opacity: 0; stroke-opacity: 0; } .nvd3.nv-scatter.nv-single-point .nv-groups .nv-point { fill-opacity: 0.5 !important; stroke-opacity: 0.5 !important; } .with-transitions .nvd3 .nv-groups .nv-point { transition: stroke-width 250ms linear, stroke-opacity 250ms linear; -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear; } .nvd3.nv-scatter .nv-groups .nv-point.hover, .nvd3 .nv-groups .nv-point.hover { stroke-width: 7px; fill-opacity: 0.95 !important; stroke-opacity: 0.95 !important; } .nvd3 .nv-point-paths path { stroke: #aaa; stroke-opacity: 0; fill: #eee; fill-opacity: 0; } .nvd3 .nv-indexLine { cursor: ew-resize; } /******************** * SVG CSS */ /******************** Default CSS for an svg element nvd3 used */ svg.nvd3-svg { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -ms-user-select: none; -moz-user-select: none; user-select: none; display: block; width: 100%; height: 100%; } /******************** Box shadow and border radius styling */ .nvtooltip.with-3d-shadow, .with-3d-shadow .nvtooltip { -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .nvd3 text { font: normal 12px Arial; } .nvd3 .title { font: bold 14px Arial; } .nvd3 .nv-background { fill: white; fill-opacity: 0; } .nvd3.nv-noData { font-size: 18px; font-weight: bold; } /********** * Brush */ .nv-brush .extent { fill-opacity: 0.125; shape-rendering: crispEdges; } .nv-brush .resize path { fill: #eee; stroke: #666; } /********** * Legend */ .nvd3 .nv-legend .nv-series { cursor: pointer; } .nvd3 .nv-legend .nv-disabled circle { fill-opacity: 0; } /* focus */ .nvd3 .nv-brush .extent { fill-opacity: 0 !important; } .nvd3 .nv-brushBackground rect { stroke: #000; stroke-width: 0.4; fill: #fff; fill-opacity: 0.7; } /********** * Print */ @media print { .nvd3 text { stroke-width: 0; fill-opacity: 1; } } .nvd3.nv-ohlcBar .nv-ticks .nv-tick { stroke-width: 1px; } .nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover { stroke-width: 2px; } .nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive { stroke: #2ca02c; } .nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative { stroke: #d62728; } .nvd3 .background path { fill: none; stroke: #eee; stroke-opacity: 0.4; shape-rendering: crispEdges; } .nvd3 .foreground path { fill: none; stroke-opacity: 0.7; } .nvd3 .nv-parallelCoordinates-brush .extent { fill: #fff; fill-opacity: 0.6; stroke: gray; shape-rendering: crispEdges; } .nvd3 .nv-parallelCoordinates .hover { fill-opacity: 1; stroke-width: 3px; } .nvd3 .missingValuesline line { fill: none; stroke: black; stroke-width: 1; stroke-opacity: 1; stroke-dasharray: 5, 5; } .nvd3.nv-pie path { stroke-opacity: 0; transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear; } .nvd3.nv-pie .nv-pie-title { font-size: 24px; fill: rgba(19, 196, 249, 0.59); } .nvd3.nv-pie .nv-slice text { stroke: #000; stroke-width: 0; } .nvd3.nv-pie path { stroke: #fff; stroke-width: 1px; stroke-opacity: 1; } .nvd3.nv-pie path { fill-opacity: 0.7; } .nvd3.nv-pie .hover path { fill-opacity: 1; } .nvd3.nv-pie .nv-label { pointer-events: none; } .nvd3.nv-pie .nv-label rect { fill-opacity: 0; stroke-opacity: 0; } /* scatter */ .nvd3 .nv-groups .nv-point.hover { stroke-width: 20px; stroke-opacity: 0.5; } .nvd3 .nv-scatter .nv-point.hover { fill-opacity: 1; } .nv-noninteractive { pointer-events: none; } .nv-distx, .nv-disty { pointer-events: none; } /* sparkline */ .nvd3.nv-sparkline path { fill: none; } .nvd3.nv-sparklineplus g.nv-hoverValue { pointer-events: none; } .nvd3.nv-sparklineplus .nv-hoverValue line { stroke: #333; stroke-width: 1.5px; } .nvd3.nv-sparklineplus, .nvd3.nv-sparklineplus g { pointer-events: all; } .nvd3 .nv-hoverArea { fill-opacity: 0; stroke-opacity: 0; } .nvd3.nv-sparklineplus .nv-xValue, .nvd3.nv-sparklineplus .nv-yValue { stroke-width: 0; font-size: 0.9em; font-weight: normal; } .nvd3.nv-sparklineplus .nv-yValue { stroke: #f66; } .nvd3.nv-sparklineplus .nv-maxValue { stroke: #2ca02c; fill: #2ca02c; } .nvd3.nv-sparklineplus .nv-minValue { stroke: #d62728; fill: #d62728; } .nvd3.nv-sparklineplus .nv-currentValue { font-weight: bold; font-size: 1.1em; } /* stacked area */ .nvd3.nv-stackedarea path.nv-area { fill-opacity: 0.7; stroke-opacity: 0; transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear; } .nvd3.nv-stackedarea path.nv-area.hover { fill-opacity: 0.9; } .nvd3.nv-stackedarea .nv-groups .nv-point { stroke-opacity: 0; fill-opacity: 0; } .nvtooltip { position: absolute; background-color: rgba(255, 255, 255, 1); color: rgba(0, 0, 0, 1); padding: 1px; border: 1px solid rgba(0, 0, 0, 0.2); z-index: 10000; display: block; font-family: Arial; font-size: 13px; text-align: left; pointer-events: none; white-space: nowrap; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .nvtooltip { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 0, 0, 0.5); border-radius: 4px; } /*Give tooltips that old fade in transition by putting a "with-transitions" class on the container div. */ .nvtooltip.with-transitions, .with-transitions .nvtooltip { transition: opacity 50ms linear; -moz-transition: opacity 50ms linear; -webkit-transition: opacity 50ms linear; transition-delay: 200ms; -moz-transition-delay: 200ms; -webkit-transition-delay: 200ms; } .nvtooltip.x-nvtooltip, .nvtooltip.y-nvtooltip { padding: 8px; } .nvtooltip h3 { margin: 0; padding: 4px 14px; line-height: 18px; font-weight: normal; background-color: rgba(247, 247, 247, 0.75); color: rgba(0, 0, 0, 1); text-align: center; border-bottom: 1px solid #ebebeb; -webkit-border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; } .nvtooltip p { margin: 0; padding: 5px 14px; text-align: center; } .nvtooltip span { display: inline-block; margin: 2px 0; } .nvtooltip table { margin: 6px; border-spacing: 0; } .nvtooltip table td { padding: 2px 9px 2px 0; vertical-align: middle; } .nvtooltip table td.key { font-weight: normal; } .nvtooltip table td.key.total { font-weight: bold; } .nvtooltip table td.value { text-align: right; font-weight: bold; } .nvtooltip table td.percent { color: darkgray; } .nvtooltip table tr.highlight td { padding: 1px 9px 1px 0; border-bottom-style: solid; border-bottom-width: 1px; border-top-style: solid; border-top-width: 1px; } .nvtooltip table td.legend-color-guide div { width: 8px; height: 8px; vertical-align: middle; } .nvtooltip table td.legend-color-guide div { width: 12px; height: 12px; border: 1px solid #999; } .nvtooltip .footer { padding: 3px; text-align: center; } .nvtooltip-pending-removal { pointer-events: none; display: none; } /**** Interactive Layer */ .nvd3 .nv-interactiveGuideLine { pointer-events: none; } .nvd3 line.nv-guideline { stroke: #ccc; }
overleaf/web/frontend/stylesheets/components/nvd3.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/components/nvd3.less", "repo_id": "overleaf", "token_count": 5505 }
597
// // Wells // -------------------------------------------------- // Base class .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: @well-bg; border: 1px solid @well-border; border-radius: @border-radius-base; .box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.05)); blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } } // Sizes .well-lg { padding: 24px; border-radius: @border-radius-large; } .well-sm { padding: 9px; border-radius: @border-radius-small; }
overleaf/web/frontend/stylesheets/components/wells.less/0
{ "file_path": "overleaf/web/frontend/stylesheets/components/wells.less", "repo_id": "overleaf", "token_count": 212 }
598
.CodeMirror-dialog { position: absolute; left: 0; right: 0; background: inherit; z-index: 15; padding: .1em .8em; overflow: hidden; color: inherit; } .CodeMirror-dialog-top { border-bottom: 1px solid #eee; top: 0; } .CodeMirror-dialog-bottom { border-top: 1px solid #eee; bottom: 0; } .CodeMirror-dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace; } .CodeMirror-dialog button { font-size: 70%; }
overleaf/web/frontend/stylesheets/vendor/codemirror-dialog.css/0
{ "file_path": "overleaf/web/frontend/stylesheets/vendor/codemirror-dialog.css", "repo_id": "overleaf", "token_count": 204 }
599