CINXE.COM

FIG News - Averina sisters dominate as World Cup Series concludes in Pesaro

<!-- TO INSERT ON EVERY PAGES --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="FIG News - Averina sisters dominate as World Cup Series concludes in Pesaro"> <meta name="google-site-verification" content="6EO-jBY_YxiPURRYgysMkAFRviB6qpP9c98hlHvYyas" /> <meta name="google-site-verification" content="PwA5IIKHDsGy4i2DFKJucwYiaU-hzgJKM_6nWZCtrws" /> <!-- Custom page metas --> <meta property="og:title" content="Averina sisters dominate as World Cup Series concludes in Pesaro" /> <meta property="og:type" content="article" /> <meta property="og:url" content="https://www.gymnastics.sport/site/news/displaynews.php?urlNews=3160" /> <meta property="og:image" content="https://www.gymnastics.sport/site/images/news/3160" /> <meta property="og:description" content="Arina and Dina Averina (RUS) dominated the Rhythmic Gymnastics World Cup in Pesaro (ITA) both entering the medal podium in every single event. Linoy Ashram of Israel was the only gymnast to beat the two as she claimed victory with the Ball." /> <title>FIG News - Averina sisters dominate as World Cup Series concludes in Pesaro</title> <script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '287138325637613'); fbq('track', 'PageView'); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=287138325637613&ev=PageView&noscript=1" /> </noscript> <link rel="shortcut icon" href="data:image/vnd.microsoft.icon;base64,AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////Cv7+/jr59Ot58+jStvr27uf+/v79///////////+/v79+vbu5/Po0rb59Ot5/v7+Ov///wr///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////B/38+j/48ui08ubP4968ff/t2rn/9OrW//79+//+/fz//v37//79+//06NP/7Nq3/+PHk//27d7j9u7ftP38+j////8H////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///yj17Nut3Lp8+MmTLv/r1rH/8OHF/+/fwv/z6NH/9OrW//Tp1P/x48n/9u3d//fw4v/v38L/7t2//+PGkf/Ijyj/3Lp8+PXs263///8o////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wP9+/hQ9u/g0ty4dv3Omz//48aR/9OlUv/ixY//4sSO/+zZt//t27j/8uXN//HjyP/v38H/7Ni0/+LGkP/gwon/0qRQ/+THlP/OnED/3bt8/fbv4NL9+/hK////A////wD///8A////AP///wD///8A////AP///wD///8D////V+TJl+3GiyD/5s6g//nz6f/Vqlv/2rRu/9q1cP/Wq17/2LFo/+LFjv/as27/2K9l/+XLm//UqFj/27d1/9y5eP/Xr2T/1KlY//jy5v/kyZj/xosg/+TJl+3///9X////A////wD///8A////AP///wD///8A////AP37+FDkyZftwoQT/cuXNv/kyZb/z55D/+nTqf/u3sD/169l/+rWr//Pn0b/5cua/9asX//Wq17/48aS/9GiS//q1a7/3bx9//Dix//mzJ3/zJk7/+PIlf/LljT/woQT/eTJl+39+/hQ////AP///wD///8A////AP///wD///8o+fPn0tSoWP/GiyD/5syd/8aLH//ChRP/5syd/8yXOP/lypj/48eS/+fOof/o0KT/6NCl/+jQpf/mzJ3/6NKo/+DBh//o0aX/zps//+bNnv/BgQ3/xYsf/+XKmf/GjCH/1atd//nz59L///8o////AP///wD///8A////B/Xs263Nmjz93r2A//Pn0v/gwYb/yJAq/9++gP/OnED/woQR/+HCif/Ehxj/3r2A/8iRK//Up1b/1KdW/8WKHv/gwYf/w4UU/+LFjv/EiBn/0qRQ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3/eH+v/4ST0P+Ek9D/eH+v/4OMvf+eflL/u3oD/9q0b//MmDj/vnsA/+DBiP/Lljb/zJg4/+fPov/jx5T/3bx9/+XKmP/79/F5////OuLFkOO/fgf/xosg/+DBiP/AgAv/vnwC/+PHk//Fih3/wYEM/+XKmv/Ehxn/zZs+/97Cjv/Bkj//za58/82ufP/Bkj//38KQ/86bP//DhRX/48aR/8KEEf/Fix//4sSO/757Af/BgQ3/4MGI/8WJHP/Afwj/4sWQ4////zr///8K9ezbtMCACv+/fgf/4MCG/8eOJf++ewD/165j/9mzbP/Yr2X/8eTL/+fPov/hwon/7du6/9y5ef/mzZ//5s2f/9y5eP/u3Lv/4sOM/+TJlv/z59D/2K9l/9q0bv/Xr2X/vnsA/8qUMf/evX//v34G/8CACv/17Nu0////Cv///wD9/Po/3Lp7+L99BP/Mlzf/5s2e/9ixaf/kyJb/8eTL/8+fR//MmDf/4MCG/8KDEP/hw4z/w4UU/9OmU//TplP/woQT/+HDi//Bgw//3Ll5/9ChSv/QoUr/8eTL/+TIlv/Zsmv/58+j/8iQKf+/fQT/3Lp7+P38+j////8A////AP///wf17Nut0aNN/eHDi//v3r//4MCF/8OFFP/Xr2b/1KlZ/8GCDv/hw43/xosf/926ef/KlTP/1KhY/9SoWP/Jki3/3rx//8OGFv/ixI3/w4UU/9WqXP/XsGb/w4UU/+HDjP/v4ML/4MKI/9GjTf317Nut////B////wD///8A////AP///yj58ufSzZo8/8OGFf/jx5P/yZEs/799Bf/kyZf/1KdW/+XMnP/q1Kz/586h/+7cvP/q1a//6tWv/+vXsv/o0KX/5cua/+rVrv/UqFj/5MmX/799Bf/KlDD/5cqY/8OGFf/Nmjz/+fLn0v///yj///8A////AP///wD///8A////AP37+FDkyZftwoQS/ceNI//ixI3/0qRR/+nTq//x5Mv/1KhY/+fQo//Nmz//5syd/9OmVP/TplP/4sWP/8uXNv/o0ab/1qxe/+/fwP/o0af/169k/+bNnv/HjSP/woQS/eTJl+39+/hK////AP///wD///8A////AP///wD///8A////A////1fkyZftxosg/+TIlf/169n/0qRO/9KjTv/hw4v/06ZU/9y3df/iw43/3Lh2/9qzbv/ixI7/1qxg/9mza//gwYf/0aNN/9OmU//06dX/5cuc/8mTLv/kyZft////V////wP///8A////AP///wD///8A////AP///wD///8A////A/37+FD27+DS3Lh2/cmRLP/jxpH/1q1h/+DBiP/p0qj/8OLH//Hjyf/27dz/9u3c//Llzf/y5Mv/69av/+DAhv/WrF//4cOL/8iRKv/WrWH9+PHl0v37+FD///8D////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///yj17Nut3Lp7+MqUMP/w4sb/9OnU/+7dvf/x5Mr/9evY//Tq1f/06dX/9eza//Xq1//u3b3/8+bP//Hkyv/MmDj/3Lp7+PXs263///8o////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wf9/Po/+vbttO3auOPWq17/5cub//Pn0P/+/fv//v79//7+/f/+/fv/8+fR/+XLm//Vq13/6dOs4/r38LT9/Po/////B////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8K/v7+Ovn063nx48m29eva5/7+/f3///////////7+/f3169rn8ePJtvn063n+/v46////Cv///wD///8A////AP///wD///8A////AP///wD///8A////AP/wD///gAH//gAAf/wAAD/4AAAf8AAAD+AAAAfAAAADwAAAA4AAAAGAAAABgAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAYAAAAGAAAABwAAAA8AAAAPgAAAH8AAAD/gAAB/8AAA//gAAf/+AAf//8A//KAAAABAAAAAgAAAAAQAgAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wH9+/g/8eXNpvTo0+f+/v39/v79/fPo0uf06tem/Pr2P////wH///8A////AP///wD///8A////AP7+/RXx5Myo1ate/eTIlv/s2bb/8uXM//LkzP/t27r/4cKK/9WrXv3y5c6o/v79E////wD///8A////AP7+/RXixZDL165j/+HDjP/evYD/2rRv/968ff/du3z/27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Of+/v39/v79/e/gxOfu3Lym/fz6P////wH///8A////AP///wD4HwAA4AcAAMADAACAAQAAgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAOAHAAD4HwAA" /> <!-- Font awesome 5 kit code --> <script src="https://kit.fontawesome.com/05e29f91e1.js" crossorigin="anonymous"></script> <script type="text/javascript" src="https://www.gymnastics.sport/site/tarteaucitron/tarteaucitron.js"></script> <script type="text/javascript"> tarteaucitron.init({ "privacyUrl": "", /* Privacy policy url */ "hashtag": "#tarteaucitron", /* Open the panel with this hashtag */ "cookieName": "tartaucitron", /* Cookie name */ "orientation": "bottom", /* Banner position (top - bottom) */ "showAlertSmall": true, /* Show the small banner on bottom right */ "cookieslist": true, /* Show the cookie list */ "adblocker": false, /* Show a Warning if an adblocker is detected */ "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */ "highPrivacy": true, /* Disable auto consent */ "handleBrowserDNTRequest": false, /* If Do Not Track == 1, accept all */ "removeCredit": true, /* Remove credit link */ "moreInfoLink": true, /* Show more info link */ //"cookieDomain": ".my-multisite-domaine.fr" /* Shared cookie for subdomain */ }); var tarteaucitronForceLanguage = 'en'; /* supported: fr, en, de, es, it, pt, pl, ru */ // GOOGLE ANALYTICS tarteaucitron.user.analyticsUa = 'UA-6402141-1'; tarteaucitron.user.analyticsMore = function () { /* add here your optionnal ga.push() */ }; (tarteaucitron.job = tarteaucitron.job || []).push('analytics'); // FACEBOOK PIXEL tarteaucitron.user.facebookpixelId = '431717569312328'; tarteaucitron.user.facebookpixelMore = function () { /* add here your optionnal facebook pixel function */ }; (tarteaucitron.job = tarteaucitron.job || []).push('facebookpixel'); </script> <!-- Meta Pixel Code --> <script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '431717569312328'); fbq('track', 'PageView'); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=431717569312328&ev=PageView&noscript=1" /></noscript> <!-- End Meta Pixel Code --> <!-- Google Analytics Code --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-6402141-1', 'auto'); ga('send', 'pageview'); </script> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-WZEK38H5TF"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-WZEK38H5TF'); </script> <script> var MainConfig = { context : '' }; </script> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" /> <link rel="stylesheet" type="text/css" href="data:text/css;base64,bGkuc2VsZWN0ZWR7IC8qIEJvb3RzdHJhcCA1IG11bHRpc2VsZWN0ICovCiAgYmFja2dyb3VuZDojOThmYjk4Owp9CgovKi53ZWxsIHsKICBwYWRkaW5nLXRvcDowOwp9Cgpoci5lbXB0eSB7CiAgYm9yZGVyOjA7CiAgbWFyZ2luOjAgMCAyNXB4IDA7Cn0qLwoKLmJpZ2dlcnsKICBmb250LXNpemU6MTE1JTsKfQoKLnBhbmVsLWhlYWRpbmcgYXsKICB0ZXh0LWRlY29yYXRpb246bm9uZQp9Ci5wYW5lbC1kZWZhdWx0ewogIGJhY2tncm91bmQ6I2VlZTsKfQoKZm9ybXsKICBtYXJnaW4tYm90dG9tOjVweDsKfQoKLnR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C13ZWJraXQtYWxpZ24taXRlbXM6IGNlbnRlcjsKICAtbXMtZmxleC1hbGlnbjogY2VudGVyOwogICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKfQpAbWVkaWEgKG1pbi13aWR0aDogOTYwcHgpIHsKICAudG9wYmFyX19jb250YWluZXIgewogICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjogcm93OwoKICAgIC13ZWJraXQtYm94LW9yaWVudDogaG9yaXpvbnRhbDsKICAgIC13ZWJraXQtYm94LWRpcmVjdGlvbjogbm9ybWFsOwogICAgLXdlYmtpdC1mbGV4LWRpcmVjdGlvbjogcm93OwogICAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogcm93OwogICAgLXdlYmtpdC1ib3gtcGFjazoganVzdGlmeTsKICAgIC13ZWJraXQtanVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgLW1zLWZsZXgtcGFjazoganVzdGlmeTsKICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIH0KfQoudG9wYmFyX19zaWRlIHsKICBkaXNwbGF5OiAtd2Via2l0LWJveDsKICBkaXNwbGF5OiAtd2Via2l0LWZsZXg7CiAgZGlzcGxheTogLW1zLWZsZXhib3g7CiAgZGlzcGxheTogICAgICAgICBmbGV4OwogIGhlaWdodDogNDBweDsKICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7CgogIC13ZWJraXQtYm94LW9yaWVudDogaG9yaXpvbnRhbDsKICAtd2Via2l0LWJveC1kaXJlY3Rpb246IG5vcm1hbDsKICAtd2Via2l0LWZsZXgtZGlyZWN0aW9uOiByb3c7CiAgICAgIC1tcy1mbGV4LWRpcmVjdGlvbjogcm93OwogIC13ZWJraXQtYm94LWFsaWduOiBjZW50ZXI7CiAgLXdlYmtpdC1hbGlnbi1pdGVtczogY2VudGVyOwogIC1tcy1mbGV4LWFsaWduOiBjZW50ZXI7CiAgICAgICAgICBhbGlnbi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bGV4LWRpcmVjdGlvbjogcm93OwogICAgICAtbXMtZmxleC1kaXJlY3Rpb246IHJvdzsKICAtd2Via2l0LWJveC1hbGlnbjogY2VudGVyOwogIC13ZWJraXQtYWxpZ24taXRlbXM6IGNlbnRlcjsKICAtbXMtZmxleC1hbGlnbjogY2VudGVyOwogICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKfQpAbWVkaWEgKG1pbi13aWR0aDogNzY4cHgpIHsKICAubmV3cy10ZWFzZXJfX2J0biB7CiAgICBwYWRkaW5nOiAwOwogICAgbWFyZ2luLWxlZnQ6IGF1dG87CgogICAgLXdlYmtpdC1ib3gtZmxleDogMDsKICAgIC13ZWJraXQtZmxleDogMCAwIDEwMHB4OwogICAgICAgIC1tcy1mbGV4OiAwIDAgMTAwcHg7CiAgICAgICAgICAgIGZsZXg6IDAgMCAxMDBweDsKICAgIC13ZWJraXQtYm94LXBhY2s6IGNlbnRlcjsKICAgIC13ZWJraXQtanVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICAtbXMtZmxleC1wYWNrOiBjZW50ZXI7CiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIH0KfQpAbWVkaWEgKG1pbi13aWR0aDogOTYwcHgpIHsKICAubmV3cy10ZWFzZXJfX2J0biB7CiAgICAtd2Via2l0LWJveC1mbGV4OiAwOwogICAgLXdlYmtpdC1mbGV4OiAwIDAgMTQwcHg7CiAgICAgICAgLW1zLWZsZXg6IDAgMCAxNDBweDsKICAgICAgICAgICAgZmxleDogMCAwIDE0MHB4OwogIH0KfQoubmV3cy10ZWFzZXJfX2J0biBzdmcgewogIHdpZHRoOiA1MHB4OwogIGhlaWdodDogNTBweDsKICBjb2xvcjogI2ZmNjg0ZTsKfQouZXZlbnQgewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKICBvdmVyZmxvdzogaGlkZGVuOwogIGJhY2tncm91bmQtY29sb3I6ICNmZmY7Cn0KLmV2ZW50OmJlZm9yZSB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIHJpZ2h0OiAwOwogIGJvdHRvbTogMDsKICBsZWZ0OiAwOwogIHotaW5kZXg6IDI7CiAgZGlzcGxheTogYmxvY2s7CiAgaGVpZ2h0OiAxcHg7CiAgY29udGVudDogIiI7CiAgLXdlYmtpdC1ib3gtc2hhZG93OiAwIDAgN3B4IHJnYmEoMCwgMCwgMCwgLjUpOwogICAgICAgICAgYm94LXNoYWRvdzogMCAwIDdweCByZ2JhKDAsIDAsIDAsIC41KTsKfQpAbWVkaWEgKG1pbi13aWR0aDogMTUwMHB4KSB7CiAgLmV2ZW50X19jb250YWluZXIgewogICAgZGlzcGxheTogLXdlYmtpdC1ib3g7CiAgICBkaXNwbGF5OiAtd2Via2l0LWZsZXg7CiAgICBkaXNwbGF5OiAtbXMtZmxleGJveDsKICAgIGRpc3BsYXk6ICAgICAgICAgZmxleDsKICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246IHJvdzsKCiAgICAtd2Via2l0LWJveC1vcmllbnQ6IGhvcml6b250YWw7CiAgICAtd2Via2l0LWJveC1kaXJlY3Rpb246IG5vcm1hbDsKICAgIC13ZWJraXQtZmxleC1kaXJlY3Rpb246IHJvdzsKICAgICAgICAtbXMtZmxleC1kaXJlY3Rpb246IHJvdzsKICAgIC13ZWJraXQtYm94LWFsaWduOiBjZW50ZXI7CiAgICAtd2Via2l0LWFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAtbXMtZmxleC1hbGlnbjogY2VudGVyOwogICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgLXdlYmtpdC1ib3gtcGFjazoganVzdGlmeTsKICAgIC13ZWJraXQtanVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgLW1zLWZsZXgtcGFjazoganVzdGlmeTsKICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIH0KfQouZXZlbnRfX2JvZHkgewogIHBhZGRpb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KICAgIHBhZGRpbmctYm90dG9tOiA1MHB4OwoKICAgIC13ZWJraXQtYm94LXBhY2s6IGNlbnRlcjsKICAgIC13ZWJraXQtanVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICAtbXMtZmxleC1wYWNrOiBjZW50ZXI7CiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIH0KfQouc3BsaXRfX2JvZHkgewogIHdpZHRoOiAxMDAlOwogIHBhZGRpbmc6IDMwcHggNDBweCAyMDBweDsKICBjb2xvcjogI2ZmZjsKfQpAbWVkaWEgKG1pbi13aWR0aDogOTAwcHgpIGFuZCAobWF4LWhlaWdodDogNDk5cHgpIHsKICAuc3BsaXRfX2JvZHkgewogICAgcGFkZGluZzogMzBweCA0MHB4IDE1MHB4OwogIH0KfQpAbWVkaWEgKG1pbi13aWR0aDogOTAwcHgpIGFuZCAobWluLWhlaWdodDogNTAwcHgpIHsKICAuc3BsaXRfX2JvZHkgewogICAgd2lkdGg6IC13ZWJraXQtY2FsYygxMDAlIC0gNzAwcHgpOwogICAgd2lkdGg6ICAgICAgICAgY2FsYygxMDAlIC0gNzAwcHgpOwogICAgbWF4LXdpZHRoOiA2MjBweDsKICAgIC13ZWJraXQtYm94LXNpemluZzogY29udGVudC1ib3g7CiAgICAgICAtbW96LWJveC1zaXppbmc6IGNvbnRlbnQtYm94OwogICAgICAgICAgICBib3gtc2l6aW5nOiBjb250ZW50LWJveDsKICAgIHBhZGRpbmc6IDMwcHggNDBweDsKICB9Cn0KQG1lZGlhIChtaW4td2lkdGg6IDE2MDBweCkgewogIC5zcGxpdF9fYm9keSB7CiAgICBwYWRkaW5nOiAzMHB4IDEwMHB4OwogIH0KfQouc3BsaXRfX3RpdGxlIHsKICBmb250LWZhbWlseTogUm9ib3RvOwogIGZvbnQtc2l6ZTogMzBweDsKICBsaW5lLWhlaWdodDogMS4yNTsKICB0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlOwp9CkBtZWRpYSAobWlu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NwbGF5OiBub25lICFpbXBvcnRhbnQ7Cn0KLnZpc2libGUteHMtYmxvY2ssCi52aXNpYmxlLXhzLWlubGluZSwKLnZpc2libGUteHMtaW5saW5lLWJsb2NrLAoudmlzaWJsZS1zbS1ibG9jaywKLnZpc2libGUtc20taW5saW5lLAoudmlzaWJsZS1zbS1pbmxpbmUtYmxvY2ssCi52aXNpYmxlLW1kLWJsb2NrLAoudmlzaWJsZS1tZC1pbmxpbmUsCi52aXNpYmxlLW1kLWlubGluZS1ibG9jaywKLnZpc2libGUtbGctYmxvY2ssCi52aXNpYmxlLWxnLWlubGluZSwKLnZpc2libGUtbGctaW5saW5lLWJsb2NrIHsKICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7Cn0KQG1lZGlhIChtYXgtd2lkdGg6IDc2N3B4KSB7CiAgLnZpc2libGUteHMgewogICAgZGlzcGxheTogYmxvY2sgIWltcG9ydGFudDsKICB9CiAgdGFibGUudmlzaWJsZS14cyB7CiAgICBkaXNwbGF5OiB0YWJsZSAhaW1wb3J0YW50OwogIH0KICB0ci52aXNpYmxlLXhzIHsKICAgIGRpc3BsYXk6IHRhYmxlLXJvdyAhaW1wb3J0YW50OwogIH0KICB0aC52aXNpYmxlLXhzLAogIHRkLnZpc2libGUteHMgewogICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50OwogIH0KfQpAbWVkaWEgKG1heC13aWR0aDogNzY3cHgpIHsKICAudmlzaWJsZS14cy1ibG9jayB7CiAgICBkaXNwbGF5OiBibG9jayAhaW1wb3J0YW50OwogIH0KfQpAbWVkaWEgKG1heC13aWR0aDogNzY3cHgpIHsKICAudmlzaWJsZS14cy1pbmxpbmUgewogICAgZGlzcGxheTogaW5saW5lICFpbXBvcnRhbnQ7CiAgfQp9CkBtZWRpYSAobWF4LXdpZHRoOiA3NjdweCkgewogIC52aXNpYmxlLXhzLWlubGluZS1ibG9jayB7CiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2sgIWltcG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udmlzaWJsZS1wcmludCwKICB0ZC52aXNpYmxlLXByaW50IHsKICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDsKICB9Cn0KLnZpc2libGUtcHJpbnQtYmxvY2sgewogIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDsKfQpAbWVkaWEgcHJpbnQgewogIC52aXNpYmxlLXByaW50LWJsb2NrIHsKICAgIGRpc3BsYXk6IGJsb2NrICFpbXBvcnRhbnQ7CiAgfQp9Ci52aXNpYmxlLXByaW50LWlubGluZSB7CiAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50Owp9CkBtZWRpYSBwcmludCB7CiAgLnZpc2libGUtcHJpbnQtaW5saW5lIHsKICAgIGRpc3BsYXk6IGlubGluZSAhaW1wb3J0YW50OwogIH0KfQoudmlzaWJsZS1wcmludC1pbmxpbmUtYmxvY2sgewogIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDsKfQpAbWVkaWEgcHJpbnQgewogIC52aXNpYmxlLXByaW50LWlubGluZS1ibG9jayB7CiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2sgIWltcG9ydGFudDsKICB9Cn0KQG1lZGlhIHByaW50IHsKICAuaGlkZGVuLXByaW50IHsKICAgIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDsKICB9Cn0KLyojIHNvdXJjZU1hcHBpbmdVUkw9Ym9vdHN0cmFwLmNzcy5tYXAgKi8K" /> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Roboto" /> <link rel="stylesheet" type="text/css" href="../css/bootstrap.css" /> <script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <script type="application/javascript" src="data:application/javascript;base64,Ly8gVGhpcyBmaWxlIGlzIGF1dG9nZW5lcmF0ZWQgdmlhIHRoZSBgY29tbW9uanNgIEdydW50IHRhc2suIFlvdSBjYW4gcmVxdWlyZSgpIHRoaXMgZmlsZSBpbiBhIENvbW1vbkpTIGVudmlyb25tZW50LgpyZXF1aXJlKCcuLi8uLi9qcy90cmFuc2l0aW9uLmpzJykKcmVxdWlyZSgnLi4vLi4vanMvYWxlcnQuanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9idXR0b24uanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9zbGljay5qcycpCnJlcXVpcmUoJy4uLy4uL2pzL2NvbGxhcHNlLmpzJykKcmVxdWlyZSgnLi4vLi4vanMvZHJvcGRvd24uanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9tb2RhbC5qcycpCnJlcXVpcmUoJy4uLy4uL2pzL3Rvb2x0aXAuanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9wb3BtZW51LmpzJykKcmVxdWlyZSgnLi4vLi4vanMvcG9wb3Zlci5qcycpCnJlcXVpcmUoJy4uLy4uL2pzL3Njcm9sbHNweS5qcycpCnJlcXVpcmUoJy4uLy4uL2pzL3RhYi5qcycpCnJlcXVpcmUoJy4uLy4uL2pzL2FmZml4LmpzJykKcmVxdWlyZSgnLi4vLi4vanMvbWFnbmlmaWMtcG9wdXAuanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9wb3B1cC5qcycpCnJlcXVpcmUoJy4uLy4uL2pzL2ZpbHRlcnMuanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9zZWFyY2guanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9kYXRlLWZpZWxkLmpzJykKcmVxdWlyZSgnLi4vLi4vanMvcHJvZmlsZS10b2dnbGUuanMnKQpyZXF1aXJlKCcuLi8uLi9qcy9leHBhbmRlci5qcycp"></script> <script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.2/vue.min.js"></script> <script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script> <script type="application/javascript" src="data:application/javascript;base64,JChmdW5jdGlvbigpIHsKICB2YXIgdG9SZWFkYWJsZURhdGUgPSBmdW5jdGlvbihkYXRlKSB7IHJldHVybiBkYXRlID8gbW9tZW50KGRhdGUpLmZvcm1hdCgnREQvTU0vWVlZWScpIDogbnVsbDsgfTsKICB2YXIgdXJsbmV3cyA9ICQoJyNuZXdzZGlzcGxheScpLmF0dHIoJ2RhdGEtZXZlbnQnKTsKICAvLy8vLy8vICBGSUcgTkVXUyBESVNQTEFZIC8vLy8vLy8KICB2YXIgYXBwID0gbmV3IFZ1ZSh7CiAgICBlbDogJyNuZXdzZGlzcGxheScsCiAgICBkYXRhOiB7CiAgICAgIHB1YmxpY2F0aW9uOiBudWxsCiAgICB9LAogICAgZmlsdGVyczogewogICAgICB0b1JlYWRhYmxlRGF0ZTogdG9SZWFkYWJsZURhdGUKICAgIH0sCiAgICBtZXRob2RzOiB7CiAgICAgIGRpc3BsYXk6IGZ1bmN0aW9uKCkgewogICAgICAgICQuZ2V0KCdodHRwczovL3d3dy5neW1uYXN0aWNzLnNwb3J0L2FwaS9uZXdzLnBocD9mdW5jdGlvbj1kaXNwbGF5JnVybE5ld3M9Jyt1cmxuZXdzLAogICAgICAgICAgZnVuY3Rpb24ocmVzcG9uc2UpIHsKICAgICAgICAgICAganNvbiA9IEpTT04ucGFyc2UocmVzcG9uc2UpOwogICAgICAgICAgICBhcHAucHVibGljYXRpb24gPSBqc29uOwogICAgICAgICAgICBjb25zb2xlLmxvZyhhcHAucHVibGljYXRpb24pOwogICAgICAgICAgfQogICAgICAgICk7CiAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICBvcmRlcmVkQXRobGV0ZXM6IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gXy5vcmRlckJ5KGFwcC5wdWJsaWNhdGlvbi5neW1uYXN0cywgJ2xhc3RuYW1lJykKICAgICAgfQogICAgfSwKICAgIG1vdW50ZWQ6IGZ1bmN0aW9uKCkgewogICAgICB0aGlzLmRpc3BsYXkoKTsKICAgIH0KICB9KTsKfSk7Cg=="></script> <script type="application/javascript" src="data:application/javascript;base64,LyoqCi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2VuZXJhdG9yRnVuY3Rpb25dJywKICAgICAgbWFwVGFnID0gJ1tvYmplY3QgTWFwXScsCiAgICAgIG51bWJlclRhZyA9ICdbb2JqZWN0IE51bWJlcl0nLAogICAgICBudWxsVGFnID0gJ1tvYmplY3QgTnVsbF0nLAogICAgICBvYmplY3RUYWcgPSAnW29iamVjdCBPYmplY3RdJywKICAgICAgcHJvbWlzZVRhZyA9ICdbb2JqZWN0IFByb21pc2VdJywKICAgICAgcHJveHlUYWcgPSAnW29iamVjdCBQcm94eV0nLAogICAgICByZWdleHBUYWcgPSAnW29iamVjdCBSZWdFeHBdJywKICAgICAgc2V0VGFnID0gJ1tvYmplY3QgU2V0XScsCiAgICAgIHN0cmluZ1RhZyA9ICdbb2JqZWN0IFN0cmluZ10nLAogICAgICBzeW1ib2xUYWcgPSAnW29iamVjdCBTeW1ib2xdJywKICAgICAgdW5kZWZpbmVkVGFnID0gJ1tvYmplY3QgVW5kZWZpbmVkXScsCiAgICAgIHdlYWtNYXBUYWcgPSAnW29iamVjdCBXZWFrTWFwXScsCiAgICAgIHdlYWtTZXRUYWcgPSAnW29iamVjdCBXZWFrU2V0XSc7CgogIHZhciBhcnJheUJ1ZmZlclRhZyA9ICdbb2JqZWN0IEFycmF5QnVmZmVyXScsCiAgICAgIGRhdGFWaWV3VGFnID0gJ1tvYmplY3QgRGF0YVZpZXddJywKICAgICAgZmxvYXQzMlRhZyA9ICdbb2JqZWN0IEZsb2F0MzJBcnJheV0nLAogICAgICBmbG9hdDY0VGFnID0gJ1tvYmplY3QgRmxvYXQ2NEFycmF5XScsCiAgICAgIGludDhUYWcgPSAnW29iamVjdCBJbnQ4QXJyYXldJywKICAgICAgaW50MTZUYWcgPSAnW29iamVjdCBJbnQxNkFycmF5XScsCiAgICAgIGludDMyVGFnID0gJ1tvYmplY3QgSW50MzJBcnJheV0nLAogICAgICB1aW50OFRhZyA9ICdbb2JqZWN0IFVpbnQ4QXJyYXldJywKICAgICAgdWludDhDbGFtcGVkV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CiAgICAgIHJzQ29tYm8gPSAnWycgKyByc0NvbWJvUmFuZ2UgKyAnXScsCiAgICAgIHJzRGlnaXRzID0gJ1xcZCsnLAogICAgICByc0RpbmdiYXQgPSAnWycgKyByc0RpbmdiYXRSYW5nZSArICddJywKICAgICAgcnNMb3dlciA9ICdbJyArIHJzTG93ZXJSYW5nZSArICddJywKICAgICAgcnNNaXNjID0gJ1teJyArIHJzQXN0cmFsUmFuZ2UgKyByc0JyZWFrUmFuZ2UgKyByc0RpZ2l0cyArIHJzRGluZ2JhdFJhbmdlICsgcnNMb3dlclJhbmdlICsgcnNVcHBlclJhbmdlICsgJ10nLAogICAgICByc0ZpdHogPSAnXFx1ZDgzY1tcXHVkZmZiLVxcdWRmZmZdJywKICAgICAgcnNNb2RpZmllciA9ICcoPzonICsgcnNDb21ibyArICd8JyArIHJzRml0eiArICcpJywKICAgICAgcnNOb25Bc3RyYWwgPSAnW14nICsgcnNBc3RyYWxSYW5nZSArICddJywKICAgICAgcnNSZWdpb25hbCA9ICcoPzpcXHVkODNjW1xcdWRkZTYtXFx1ZGRmZl0pezJ9JywKICAgICAgcnNTdXJyUGFpciA9ICdbXFx1ZDgwMC1cXHVkYmZmXVtcXHVkYzAwLVxcdWRmZmZdJywKICAgICAgcnNVcHBlciA9ICdbJyArIHJzVXBwZXJSYW5nZSArICddJywKICAgICAgcnNaV0ogPSAnXFx1MjAwZCc7CgogIC8qKiBVc2VkIHRvIGNvbXBvc2UgdW5pY29kZSByZWdleGVzLiAqLwogIHZhciByc01pc2NMb3dlciA9ICcoPzonICsgcnNMb3dlciArICd8JyArIHJzTWlzYyArICcpJywKICAgICAgcnNNaXNjVXBwZXIgPSAnKD86JyArIHJzVXBwZXIgKyAnfCcgKyByc01pc2MgKyAnKScsCiAgICAgIHJzT3B0Q29udHJMb3dlciA9ICcoPzonICsgcnNBcG9zICsgJyg/OmR8bGx8bXxyZXxzfHR8dmUpKT8nLAogICAgICByc09wdENvbnRyVXBwZXIgPSAnKD86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XJgIGluIE5vZGUuanMuCiAgICogdmFyIGRlZmVyID0gXy5ydW5JbkNvbnRleHQoeyAnc2V0VGltZW91dCc6IHNldEltbWVkaWF0ZSB9KS5kZWZlcjsKICAgKi8KICB2YXIgcnVuSW5Db250ZXh0ID0gKGZ1bmN0aW9uIHJ1bkluQ29udGV4dChjb250ZXh0KSB7CiAgICBjb250ZXh0ID0gY29udGV4dCA9PSBudWxsID8gcm9vdCA6IF8uZGVmYXVsdHMocm9vdC5PYmplY3QoKSwgY29udGV4dCwgXy5waWNrKHJvb3QsIGNvbnRleHRQcm9wcykpOwoKICAgIC8qKiBCdWlsdC1pbiBjb25zdHJ1Y3RvciByZWZlcmVuY2VzLiAqLwogICAgdmFyIEFycmF5ID0gY29udGV4dC5BcnJheSwKICAgICAgICBEYXRlID0gY29udGV4dC5EYXRlLAogICAgICAgIEVycm9yID0gY29udGV4dC5FcnJvciwKICAgICAgICBGdW5jdGlvbiA9IGNvbnRleHQuRnVuY3Rpb24sCiAgICAgICAgTWF0aCA9IGNvbnRleHQuTWF0aCwKICAgICAgICBPYmplY3QgPSBjb250ZXh0Lk9iamVjdCwKICAgICAgICBSZWdFeHAgPSBjb250ZXh0LlJlZ0V4cCwKICAgICAgICBTdHJpbmcgPSBjb250ZXh0LlN0cmluZywKICAgICAgICBUeXBlRXJyb3IgPSBjb250ZXh0LlR5cGVFcnJvcjsKCiAgICAvKiogVXNlZCBmb3IgYnVpbHQtaW4gbWV0aG9kIHJlZmVyZW5jZXMuICovCiAgICB2YXIgYXJyYXlQcm90byA9IEFycmF5LnByb3RvdHlwZSwKICAgICAgICBmdW5jUHJvdG8gPSBGdW5jdGlvbi5wcm90b3R5cGUsCiAgICAgICAgb2JqZWN0UHJvdG8gPSBPYmplY3QucHJvdG90eXBlOwoKICAgIC8qKiBVc2VkIHRvIGRldGVjdCBvdmVycmVhY2hpbmcgY29yZS1qcyBzaGltcy4gKi8KICAgIHZhciBjb3JlSnNEYXRhID0gY29udGV4dFsnX19j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gpKTsKICAgICAqIC8vID0+IHRydWUKICAgICAqLwogICAgZnVuY3Rpb24gbG9kYXNoKHZhbHVlKSB7CiAgICAgIGlmIChpc09iamVjdExpa2UodmFsdWUpICYmICFpc0FycmF5KHZhbHVlKSAmJiAhKHZhbHVlIGluc3RhbmNlb2YgTGF6eVdyYXBwZXIpKSB7CiAgICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgTG9kYXNoV3JhcHBlcikgewogICAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICAgIH0KICAgICAgICBpZiAoaGFzT3duUHJvcGVydHkuY2FsbCh2YWx1ZSwgJ19fd3JhcHBlZF9fJykpIHsKICAgICAgICAgIHJldHVybiB3cmFwcGVyQ2xvbmUodmFsdWUpOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gbmV3IExvZGFzaFdyYXBwZXIodmFsdWUpOwogICAgfQoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uY3JlYXRlYCB3aXRob3V0IHN1cHBvcnQgZm9yIGFzc2lnbmluZwogICAgICogcHJvcGVydGllcyB0byB0aGUgY3JlYXRlZCBvYmplY3QuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7T2JqZWN0fSBwcm90byBUaGUgb2JqZWN0IHRvIGluaGVyaXQgZnJvbS4KICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgKi8KICAgIHZhciBiYXNlQ3JlYXRlID0gKGZ1bmN0aW9uKCkgewogICAgICBmdW5jdGlvbiBvYmplY3QoKSB7fQogICAgICByZXR1cm4gZnVuY3Rpb24ocHJvdG8pIHsKICAgICAgICBpZiAoIWlzT2JqZWN0KHByb3RvKSkgewogICAgICAgICAgcmV0dXJuIHt9OwogICAgICAgIH0KICAgICAgICBpZiAob2JqZWN0Q3JlYXRlKSB7CiAgICAgICAgICByZXR1cm4gb2JqZWN0Q3J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k7CiAgICAgIH0KICAgICAgdmFyIHJlc3VsdCA9IFtdOwoKICAgICAgb3V0ZXI6CiAgICAgIHdoaWxlIChsZW5ndGgtLSAmJiByZXNJbmRleCA8IHRha2VDb3VudCkgewogICAgICAgIGluZGV4ICs9IGRpcjsKCiAgICAgICAgdmFyIGl0ZXJJbmRleCA9IC0xLAogICAgICAgICAgICB2YWx1ZSA9IGFycmF5W2luZGV4XTsKCiAgICAgICAgd2hpbGUgKCsraXRlckluZGV4IDwgaXRlckxlbmd0aCkgewogICAgICAgICAgdmFyIGRhdGEgPSBpdGVyYXRlZXNbaXRlckluZGV4XSwKICAgICAgICAgICAgICBpdGVyYXRlZSA9IGRhdGEuaXRlcmF0ZWUsCiAgICAgICAgICAgICAgdHlwZSA9IGRhdGEudHlwZSwKICAgICAgICAgICAgICBjb21wdXRlZCA9IGl0ZXJhdGVlKHZhbHVlKTsKCiAgICAgICAgICBpZiAodHlwZSA9PSBMQVpZX01BUF9GTEFHKSB7CiAgICAgICAgICAgIHZhbHVlID0gY29tcHV0ZWQ7CiAgICAgICAgICB9IGVsc2UgaWYgKCFjb21wdXRlZCkgewogICAgICAgICAgICBpZiAodHlwZSA9PSBMQVpZX0ZJTFRFUl9GTEFHKSB7CiAgICAgICAgICAgICAgY29udGludWUgb3V0ZXI7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgYnJlYWsgb3V0ZXI7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmVzdWx0W3Jlc0luZGV4KytdID0gdmFsdWU7CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvLyBFbnN1cmUgYExhenlXcmFwcGVyYCBpcyBhbiBpbnN0YW5jZSBvZiBgYmFzZUxvZGFzaGAuCiAgICBMYXp5V3JhcHBlci5wcm90b3R5cGUgPSBiYXNlQ3JlYXRlKGJhc2VMb2Rhc2gucHJvdG90eXBlKTsKICAgIExhenlXc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gICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAbmFtZSBkZWxldGUKICAgICAqIEBtZW1iZXJPZiBIYXNoCiAgICAgKiBAcGFyYW0ge09iamVjdH0gaGFzaCBUaGUgaGFzaCB0byBtb2RpZnkuCiAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBrZXkgb2YgdGhlIHZhbHVlIHRvIHJlbW92ZS4KICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiB0aGUgZW50cnkgd2FzIHJlbW92ZWQsIGVsc2UgYGZhbHNlYC4KICAgICAqLwogICAgZnVuY3Rpb24gaGFzaERlbGV0ZShrZXkpIHsKICAgICAgdmFyIHJlc3VsdCA9IHRoaXMuaGFzKGtleSkgJiYgZGVsZXRlIHRoaXMuX19kYXRhX19ba2V5XTsKICAgICAgdGhpcy5zaXplIC09IHJlc3VsdCA/IDEgOiAwOwogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIC8qKgogICAgICogR2V0cyB0aGUgaGFzaCB2YWx1ZSBmb3IgYGtleWAuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBuYW1lIGdldAogICAgICogQG1lbWJlck9mIEhhc2gKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUgdmFsdWUgdG8gZ2V0LgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIGVudHJ5IHZhbHVlLgogICAgICovCiAgICBmdW5jdGlvbiBoYXNoR2V0KGtleSkgewogICAgICB2YXIgZGF0YSA9IHRoaXMuX19kYXRhX187CiAgICAgIGlmIChuYXRpdmVDcmVhdGUpIHsKICAgICAgICB2YXIgcmVzdWx0ID0gZGF0YVtrZXldOwogICAgICAgIHJldHVybiByZXN1bHQgPT09IEhBU0hfVU5ERUZJTkVEID8gdW5kZWZpbmVkIDogcmVzdWx0OwogICAgICB9CiAgICAgIHJldHVybiBoYXNPd25Qcm9wZXJ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ICAgICAgICAgICAgICAvLyBTYWZhcmkgOSBoYXMgZW51bWVyYWJsZSBgYXJndW1lbnRzLmxlbmd0aGAgaW4gc3RyaWN0IG1vZGUuCiAgICAgICAgICAgICAgIGtleSA9PSAnbGVuZ3RoJyB8fAogICAgICAgICAgICAgICAvLyBOb2RlLmpzIDAuMTAgaGFzIGVudW1lcmFibGUgbm9uLWluZGV4IHByb3BlcnRpZXMgb24gYnVmZmVycy4KICAgICAgICAgICAgICAgKGlzQnVmZiAmJiAoa2V5ID09ICdvZmZzZXQnIHx8IGtleSA9PSAncGFyZW50JykpIHx8CiAgICAgICAgICAgICAgIC8vIFBoYW50b21KUyAyIGhhcyBlbnVtZXJhYmxlIG5vbi1pbmRleCBwcm9wZXJ0aWVzIG9uIHR5cGVkIGFycmF5cy4KICAgICAgICAgICAgICAgKGlzVHlwZSAmJiAoa2V5ID09ICdidWZmZXInIHx8IGtleSA9PSAnYnl0ZUxlbmd0aCcgfHwga2V5ID09ICdieXRlT2Zmc2V0JykpIHx8CiAgICAgICAgICAgICAgIC8vIFNraXAgaW5kZXggcHJvcGVydGllcy4KICAgICAgICAgICAgICAgaXNJbmRleChrZXksIGxlbmd0aCkKICAgICAgICAgICAgKSkpIHsKICAgICAgICAgIHJlc3VsdC5wdXNoKGtleSk7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CgogICAgLyoqCiAgICAgKiBBIHNwZWNpYWxpemVkIHZlcnNpb24gb2YgYF8uc2FtcGxlYCBmb3IgYXJyYXlzLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gc2FtcGxlLgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIHJhbmRvbSBlbGVtZW50LgogICAgICovCiAgICBmdW5jdGlvbiBhcnJheVNhbXBsZShhcnJheSkgewogICAgICB2YXIgbGVuZ3RoID0gYXJyYXkubGVuZ3R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leCA9IC0xLAogICAgICAgICAgbGVuZ3RoID0gcGF0aHMubGVuZ3RoLAogICAgICAgICAgcmVzdWx0ID0gQXJyYXkobGVuZ3RoKSwKICAgICAgICAgIHNraXAgPSBvYmplY3QgPT0gbnVsbDsKCiAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgcmVzdWx0W2luZGV4XSA9IHNraXAgPyB1bmRlZmluZWQgOiBnZXQob2JqZWN0LCBwYXRoc1tpbmRleF0pOwogICAgICB9CiAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CgogICAgLyoqCiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5jbGFtcGAgd2hpY2ggZG9lc24ndCBjb2VyY2UgYXJndW1lbnRzLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gY2xhbXAuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gW2xvd2VyXSBUaGUgbG93ZXIgYm91bmQuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gdXBwZXIgVGhlIHVwcGVyIGJvdW5kLgogICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY2xhbXBlZCBudW1iZXIuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGJhc2VDbGFtcChudW1iZXIsIGxvd2VyLCB1cHBlcikgewogICAgICBpZiAobnVtYmVyID09PSBudW1iZXIpIHsKICAgICAgICBpZiAodXBwZXIgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgbnVtYmVyID0gbnVtYmVyIDw9IHVwcGVyID8gbnVtYmVyIDogdXBwZXI7CiAgICAgICAgfQogICAgICAgIGlmIChsb3dlciAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICBudW1iZXIgPSBudW1iZXIgPj0gbG93ZXIgPyBudW1iZXIgOiBsb3dlcjsKICAgICAgICB9CiAgICAgIH0KICAgIC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ENMT05FX0ZMQVRfRkxBRywKICAgICAgICAgIGlzRnVsbCA9IGJpdG1hc2sgJiBDTE9ORV9TWU1CT0xTX0ZMQUc7CgogICAgICBpZiAoY3VzdG9taXplcikgewogICAgICAgIHJlc3VsdCA9IG9iamVjdCA/IGN1c3RvbWl6ZXIodmFsdWUsIGtleSwgb2JqZWN0LCBzdGFjaykgOiBjdXN0b21pemVyKHZhbHVlKTsKICAgICAgfQogICAgICBpZiAocmVzdWx0ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CiAgICAgIGlmICghaXNPYmplY3QodmFsdWUpKSB7CiAgICAgICAgcmV0dXJuIHZhbHVlOwogICAgICB9CiAgICAgIHZhciBpc0FyciA9IGlzQXJyYXkodmFsdWUpOwogICAgICBpZiAoaXNBcnIpIHsKICAgICAgICByZXN1bHQgPSBpbml0Q2xvbmVBcnJheSh2YWx1ZSk7CiAgICAgICAgaWYgKCFpc0RlZXApIHsKICAgICAgICAgIHJldHVybiBjb3B5QXJyYXkodmFsdWUsIHJlc3VsdCk7CiAgICAgICAgfQogICAgICB9IGVsc2UgewogICAgICAgIHZhciB0YWcgPSBnZXRUYWcodmFsdWUpLAogICAgICAgICAgICBpc0Z1bmMgPSB0YWcgPT0gZnVuY1RhZyB8fCB0YWcgPT0gZ2VuVGFnOwoKICAgICAgICBpZiAoaXNCdWZmZXIodmFsdWUpKSB7CiAgICAgICAgICByZXR1cm4gY2xvbmVCdWZmZXIodmFsdWUsIGlzRGVlcCk7CiAgICAgICAgfQogICAgICAgIGlmICh0YWcgPT0gb2JqZWN0VGFnIHx8IHRhZyA9PSBhcmdzVGFnIHx8IChpc0Z1bmMgJiYgIW9iamVjdCkpIHsKICAgICAgICAgIHJlc3VsdCA9IChpc0ZsYXQgfHwgaXNGdW5jKSA/IHt9IDogaW5pdENsb25lT2JqZWN0KHZhbHVlKTsKICAgICAgICAgIGlmICghaXNEZWVwKSB7CiAgICAgICAgICAgIHJld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9IGNhY2hlc1tvdGhJbmRleF07CiAgICAgICAgICAgIGlmICghKGNhY2hlCiAgICAgICAgICAgICAgICAgID8gY2FjaGVIYXMoY2FjaGUsIGNvbXB1dGVkKQogICAgICAgICAgICAgICAgICA6IGluY2x1ZGVzKGFycmF5c1tvdGhJbmRleF0sIGNvbXB1dGVkLCBjb21wYXJhdG9yKSkKICAgICAgICAgICAgICAgICkgewogICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoc2VlbikgewogICAgICAgICAgICBzZWVuLnB1c2goY29tcHV0ZWQpOwogICAgICAgICAgfQogICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaW52ZXJ0YCBhbmQgYF8uaW52ZXJ0QnlgIHdoaWNoIGludmVydHMKICAgICAqIGBvYmplY3RgIHdpdGggdmFsdWVzIHRyYW5zZm9ybWVkIGJ5IGBpdGVyYXRlZWAgYW5kIHNldCBieSBgc2V0dGVyYC4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGl0ZXJhdGUgb3Zlci4KICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IHNldHRlciBUaGUgZnVuY3Rpb24gdG8gc2V0IGBhY2N1bXVsYXRvcmAgdmFsdWVzLgogICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaXRlcmF0ZWUgVGhlIGl0ZXJhdGVlIHRvIHRyYW5zZm9ybSB2YWx1ZXMuCiAgICAgKiBAcGFyYW0ge09iamVjdH0gYWNjdW11bGF0b3IgVGhlIGluaXRpYWwgaW52ZXJ0ZWQgb2JqZWN0LgogICAgICogQHJldHVybnMge0Z1bmN0aW9ufS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ICAgICAgICAgb3RoSXNPYmogPSBvdGhUYWcgPT0gb2JqZWN0VGFnLAogICAgICAgICAgaXNTYW1lVGFnID0gb2JqVGFnID09IG90aFRhZzsKCiAgICAgIGlmIChpc1NhbWVUYWcgJiYgaXNCdWZmZXIob2JqZWN0KSkgewogICAgICAgIGlmICghaXNCdWZmZXIob3RoZXIpKSB7CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIG9iaklzQXJyID0gdHJ1ZTsKICAgICAgICBvYmpJc09iaiA9IGZhbHNlOwogICAgICB9CiAgICAgIGlmIChpc1NhbWVUYWcgJiYgIW9iaklzT2JqKSB7CiAgICAgICAgc3RhY2sgfHwgKHN0YWNrID0gbmV3IFN0YWNrKTsKICAgICAgICByZXR1cm4gKG9iaklzQXJyIHx8IGlzVHlwZWRBcnJheShvYmplY3QpKQogICAgICAgICAgPyBlcXVhbEFycmF5cyhvYmplY3QsIG90aGVyLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKQogICAgICAgICAgOiBlcXVhbEJ5VGFnKG9iamVjdCwgb3RoZXIsIG9ialRhZywgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjayk7CiAgICAgIH0KICAgICAgaWYgKCEoYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHKSkgewogICAgICAgIHZhciBvYmpJc1dyYXBwZWQgPSBvYmpJc09iaiAmJiBoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwgJ19fd3JhcHBlZF9fJyksCiAgICAgICAgICAgIG90aElzV3JhcHBlZCA9IG90aElzT2JqICYmIGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsICdfX3dyYXBwZWRfXycpOwoKICAgICAgICBpZiAob2JqSXNXcmFwcGVkIHx8IG90aElzV3JhcHBlZCkgewogICAgICAgICAgdmFyIG9ialVud3JhcHBlZCA9IG9iaklzV3JhcHBlZCA/IG9iamVjdC52Y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ICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCiAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBvYmplY3Qgb2YgcHJvcGVydHkgdmFsdWVzIHRvIG1hdGNoLgogICAgICogQHBhcmFtIHtBcnJheX0gbWF0Y2hEYXRhIFRoZSBwcm9wZXJ0eSBuYW1lcywgdmFsdWVzLCBhbmQgY29tcGFyZSBmbGFncyB0byBtYXRjaC4KICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjdXN0b21pemVyXSBUaGUgZnVuY3Rpb24gdG8gY3VzdG9taXplIGNvbXBhcmlzb25zLgogICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGBvYmplY3RgIGlzIGEgbWF0Y2gsIGVsc2UgYGZhbHNlYC4KICAgICAqLwogICAgZnVuY3Rpb24gYmFzZUlzTWF0Y2gob2JqZWN0LCBzb3VyY2UsIG1hdGNoRGF0YSwgY3VzdG9taXplcikgewogICAgICB2YXIgaW5kZXggPSBtYXRjaERhdGEubGVuZ3RoLAogICAgICAgICAgbGVuZ3RoID0gaW5kZXgsCiAgICAgICAgICBub0N1c3RvbWl6ZXIgPSAhY3VzdG9taXplcjsKCiAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkgewogICAgICAgIHJldHVybiAhbGVuZ3RoOwogICAgICB9CiAgICAgIG9iamVjdCA9IE9iamVjdChvYmplY3QpOwogICAgICB3aGlsZSAoaW5kZXgtLSkgewogICAgICAgIHZhciBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTsKICAgICAgICBpZiAoKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKQogICAgICAgICAgICAgID8gZGF0YVsxXSAhPT0gb2JqZWN0W2RhdGFbMF1dCiAgICAgICAgICAgICAgOiAhKGRhdGFbMF0gaW4gb2JqZWN0KQogICAgICAgICAgICApIHsKICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTsKICAgICAgICB2YXIga2V5ID0gZGF0YVswXSwKICAgICAgICAgICAgb2JqVmFsdWUgPSBvYmplY3Rba2V5XSwKICAgICAgICAgICAgc3JjVmFsdWUgPSBkYXRhWzFdOwoKICAgICAgICBpZiAobm9DdXN0b21pemVyICYmIGRhdGFbMl0pIHsKICAgICAgICAgIGlmIChvYmpWYWx1ZSA9PT0gdW5kZWZpbmVkICYmICEoa2V5IGluIG9iamVjdCkpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICB2YXIgc3RhY2sgPSBuZXcgU3RhY2s7CiAgICAgICAgICBpZiAoY3VzdG9taXplcikgewogICAgICAgICAgICB2YXIgcmVzdWx0ID0gY3VzdG9taXplcihvYmpWYWx1ZSwgc3JjVmFsdWUsIGtleSwgb2JqZWN0LCBzb3VyY2UsIHN0YWNrKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmICghKHJlc3VsdCA9PT0gdW5kZWZpbmVkCiAgICAgICAgICAgICAgICA/IGJhc2VJc0VxdWFsKHNyY1ZhbHVlLCBvYmpWYWx1ZSwgQ09NUEFSRV9QQVJUSUFMX0ZMQUcgfCBDT01QQVJFX1VOT1JERVJFRF9GTEFHLCBjdXN0b21pemVyLCBzdGFjaykKICAgICAgICAgICAgICAgIDogcmVzdWx0CiAgICAgICAgICAgICAgKSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiB0cnVlOwogICAgfQoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaXNOYXRpdmVgIHdpdGhvdXQgYmFkIHNoaW0g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hc2VLZXlzKG9iamVjdCkgewogICAgICBpZiAoIWlzUHJvdG90eXBlKG9iamVjdCkpIHsKICAgICAgICByZXR1cm4gbmF0aXZlS2V5cyhvYmplY3QpOwogICAgICB9CiAgICAgIHZhciByZXN1bHQgPSBbXTsKICAgICAgZm9yICh2YXIga2V5IGluIE9iamVjdChvYmplY3QpKSB7CiAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwob2JqZWN0LCBrZXkpICYmIGtleSAhPSAnY29uc3RydWN0b3InKSB7CiAgICAgICAgICByZXN1bHQucHVzaChrZXkpOwogICAgICAgIH0KICAgICAgfQogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ua2V5c0luYCB3aGljaCBkb2Vzbid0IHRyZWF0IHNwYXJzZSBhcnJheXMgYXMgZGVuc2UuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgYXJyYXkgb2YgcHJvcGVydHkgbmFtZXMuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGJhc2VLZXlzSW4ob2JqZWN0KSB7CiAgICAgIGlmICghaXNPYmplY3Qob2JqZWN0KSkgewogICAgICAgIHJldHVybiBuYXRpdmVLZXlzSW4ob2JqZWN0KTsKICAgICAgfQogICAgICB2YXIgaXNQcm90byA9IGlzUHJvdG90eXBlKG9iamVjdCksCiAgICAgICAgICByZXN1bHQgPSBbXTsKCiAgICAgIGZvciAodmFyIGtleSBpbiBvYmplY3QpIHsKICAgICAgICBpZiAoIShrZXkgPT0gJ2NvbnN0cnVjdG9yJyAmJiAoaXNQcm90byB8fCAhaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpKSkgewogICAgICAgICAgcmVzdWx0LnB1c2goa2V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ICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICB2YXIgZnJvbUluZGV4ID0gMCwKICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZXNbaW5kZXhdLAogICAgICAgICAgICBjb21wdXRlZCA9IGl0ZXJhdGVlID8gaXRlcmF0ZWUodmFsdWUpIDogdmFsdWU7CgogICAgICAgIHdoaWxlICgoZnJvbUluZGV4ID0gaW5kZXhPZihzZWVuLCBjb21wdXRlZCwgZnJvbUluZGV4LCBjb21wYXJhdG9yKSkgPiAtMSkgewogICAgICAgICAgaWYgKHNlZW4gIT09IGFycmF5KSB7CiAgICAgICAgICAgIHNwbGljZS5jYWxsKHNlZW4sIGZyb21JbmRleCwgMSk7CiAgICAgICAgICB9CiAgICAgICAgICBzcGxpY2UuY2FsbChhcnJheSwgZnJvbUluZGV4LCAxKTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGFycmF5OwogICAgfQoKICAgIC8qKgogICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ucHVsbEF0YCB3aXRob3V0IHN1cHBvcnQgZm9yIGluZGl2aWR1YWwKICAgICAqIGluZGV4ZXMgb3IgY2FwdHVyaW5nIHRoZSByZW1vdmVkIGVsZW1lbnRzLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gbW9kaWZ5LgogICAgICogQHBhcmFtIHtudW1iZXJbXX0gaW5kZXhlcyBUaGUgaW5kZXhlcyBvZiBlbGVtZW50cyB0byByZW1vdmUuCiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC4KICAgICAqLwogICAgZnVuY3Rpb24gYmFzZVB1bGxBdChhcnJheSwgaW5kZXhlcykgewogICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPyBpbmRleGVzLmxlbmd0aCA6IDAsCiAgICAgICAgICBsYXN0SW5kZX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bXSwKICAgICAgICAgIHNlZW4gPSByZXN1bHQ7CgogICAgICBpZiAoY29tcGFyYXRvcikgewogICAgICAgIGlzQ29tbW9uID0gZmFsc2U7CiAgICAgICAgaW5jbHVkZXMgPSBhcnJheUluY2x1ZGVzV2l0aDsKICAgICAgfQogICAgICBlbHNlIGlmIChsZW5ndGggPj0gTEFSR0VfQVJSQVlfU0laRSkgewogICAgICAgIHZhciBzZXQgPSBpdGVyYXRlZSA/IG51bGwgOiBjcmVhdGVTZXQoYXJyYXkpOwogICAgICAgIGlmIChzZXQpIHsKICAgICAgICAgIHJldHVybiBzZXRUb0FycmF5KHNldCk7CiAgICAgICAgfQogICAgICAgIGlzQ29tbW9uID0gZmFsc2U7CiAgICAgICAgaW5jbHVkZXMgPSBjYWNoZUhhczsKICAgICAgICBzZWVuID0gbmV3IFNldENhY2hlOwogICAgICB9CiAgICAgIGVsc2UgewogICAgICAgIHNlZW4gPSBpdGVyYXRlZSA/IFtdIDogcmVzdWx0OwogICAgICB9CiAgICAgIG91dGVyOgogICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgIHZhciB2YWx1ZSA9IGFycmF5W2luZGV4XSwKICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlOwoKICAgICAgICB2YWx1ZSA9IChjb21wYXJhdG9yIHx8IHZhbHVlICE9PSAwKSA/IHZhbHVlIDogMDsKICAgICAgICBpZiAoaXNDb21tb24gJiYgY29tcHV0ZWQgPT09IGNvbXB1dGVkKSB7CiAgICAgICAgICB2YXIgc2VlbkluZGV4ID0gc2Vlbi5sZW5ndGg7CiAgICAgICAgICB3aGlsZSAoc2VlbkluZGV4LS0pIHsKICAgICAgICAgICAgaWYgKHNlZW5bc2VlbkluZGV4XSA9PT0gY29tcHV0ZWQpIHsKICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjsKICAgICAgICAgICAgfQogICAgICAgICAgfQ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hbElzRGVmaW5lZCA9IHZhbHVlICE9PSB1bmRlZmluZWQsCiAgICAgICAgICAgIHZhbElzTnVsbCA9IHZhbHVlID09PSBudWxsLAogICAgICAgICAgICB2YWxJc1JlZmxleGl2ZSA9IHZhbHVlID09PSB2YWx1ZSwKICAgICAgICAgICAgdmFsSXNTeW1ib2wgPSBpc1N5bWJvbCh2YWx1ZSk7CgogICAgICAgIHZhciBvdGhJc0RlZmluZWQgPSBvdGhlciAhPT0gdW5kZWZpbmVkLAogICAgICAgICAgICBvdGhJc051bGwgPSBvdGhlciA9PT0gbnVsbCwKICAgICAgICAgICAgb3RoSXNSZWZsZXhpdmUgPSBvdGhlciA9PT0gb3RoZXIsCiAgICAgICAgICAgIG90aElzU3ltYm9sID0gaXNTeW1ib2wob3RoZXIpOwoKICAgICAgICBpZiAoKCFvdGhJc051bGwgJiYgIW90aElzU3ltYm9sICYmICF2YWxJc1N5bWJvbCAmJiB2YWx1ZSA+IG90aGVyKSB8fAogICAgICAgICAgICAodmFsSXNTeW1ib2wgJiYgb3RoSXNEZWZpbmVkICYmIG90aElzUmVmbGV4aXZlICYmICFvdGhJc051bGwgJiYgIW90aElzU3ltYm9sKSB8fAogICAgICAgICAgICAodmFsSXNOdWxsICYmIG90aElzRGVmaW5lZCAmJiBvdGhJc1JlZmxleGl2ZSkgfHwKICAgICAgICAgICAgKCF2YWxJc0RlZmluZWQgJiYgb3RoSXNSZWZsZXhpdmUpIHx8CiAgICAgICAgICAgICF2YWxJc1JlZmxleGl2ZSkgewogICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfQogICAgICAgIGlmICgoIXZhbElzTnVsbCAmJiAhdmFsSXNTeW1ib2wgJiYgIW90aElzU3ltYm9sICYmIHZhbHVlIDwgb3RoZXIpIHx8CiAgICAgICAgICAgIChvdGhJc1N5bWJvbCAmJiB2YWxJc0RlZmluZWQgJiYgdmFsSXNSZWZsZXhpdmUgJiYgIXZhbElzTnVsbCAmJiAhdmFsSXNTeW1ib2w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IHJlc3VsdFthcmdzSW5kZXhdID0gYXJnc1thcmdzSW5kZXhdOwogICAgICB9CiAgICAgIHZhciBvZmZzZXQgPSBhcmdzSW5kZXg7CiAgICAgIHdoaWxlICgrK3JpZ2h0SW5kZXggPCByaWdodExlbmd0aCkgewogICAgICAgIHJlc3VsdFtvZmZzZXQgKyByaWdodEluZGV4XSA9IHBhcnRpYWxzW3JpZ2h0SW5kZXhdOwogICAgICB9CiAgICAgIHdoaWxlICgrK2hvbGRlcnNJbmRleCA8IGhvbGRlcnNMZW5ndGgpIHsKICAgICAgICBpZiAoaXNVbmN1cnJpZWQgfHwgYXJnc0luZGV4IDwgYXJnc0xlbmd0aCkgewogICAgICAgICAgcmVzdWx0W29mZnNldCArIGhvbGRlcnNbaG9sZGVyc0luZGV4XV0gPSBhcmdzW2FyZ3NJbmRleCsrXTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvKioKICAgICAqIENvcGllcyB0aGUgdmFsdWVzIG9mIGBzb3VyY2VgIHRvIGBhcnJheWAuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7QXJyYXl9IHNvdXJjZSBUaGUgYXJyYXkgdG8gY29weSB2YWx1ZXMgZnJvbS4KICAgICAqIEBwYXJhbSB7QXJyYXl9IFthcnJheT1bXV0gVGhlIGFycmF5IHRvIGNvcHkgdmFsdWVzIHRvLgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBhcnJheWAuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvcHlBcnJheShzb3VyY2UsIGFycmF5KSB7CiAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgbGVuZ3RoID0gc291cmNlLmxlbmd0aDsKCiAgICAgIGFycmF5IHx8IChhcnJheSA9IEFycmF5KGxlbmd0aCkpOwogICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgIGFycmF5W2luZGV4XSA9IHNvdXJjZVtpbmRleF07CiAgICAgIH0KICAgICAgcmV0dXJuIGFycmF5OwogICAgfQoKICAgIC8qKgogICAgICogQ29waWVzIHByb3BlcnRpZXMgb2YgYHNvdXJjZWAgdG8gYG9iamVjdGAuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7T2JqZWN0fSBzb3VyY2UgVGhlIG9iamVjdCB0byBjb3B5IHByb3BlcnRpZXMgZnJvbS4KICAgICAqIEBwYXJhbSB7QXJyYXl9IHByb3BzIFRoZSBwcm9wZXJ0eSBpZGVudGlmaWVycyB0byBjb3B5LgogICAgICogQHBhcmFtIHtPYmplY3R9IFtvYmplY3Q9e31dIFRoZSBvYmplY3QgdG8gY29weSBwcm9wZXJ0aWVzIHRvLgogICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2N1c3RvbWl6ZXJdIFRoZSBmdW5jdGlvbiB0byBjdXN0b21pemUgY29waWVkIHZhbHVlcy4KICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvcHlPYmplY3Qoc291cmNlLCBwcm9wcywgb2JqZWN0LCBjdXN0b21pemVyKSB7CiAgICAgIHZhciBpc05ldyA9ICFvYmplY3Q7CiAgICAgIG9iamVjdCB8fCAob2JqZWN0ID0ge30pOwoKICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICBsZW5ndGggPSBwcm9wcy5sZW5ndGg7CgogICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgIHZhciBrZXkgPSBwcm9wc1tpbmRleF07CgogICAgICAgIHZhciBuZXdWYWx1ZSA9IGN1c3RvbWl6ZXIKICAgICAgICAgID8gY3VzdG9taXplcihvYmplY3Rba2V5XSwgc291cmNlW2tleV0sIGtleSwgb2JqZWN0LCBzb3VyY2UpCiAgICAgICAgICA6IHVuZGVmaW5lZDsKCiAgICAgICAgaWYgKG5ld1Zhb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zLCBhcmd1bWVudHMpOwogICAgICB9CiAgICAgIHJldHVybiB3cmFwcGVyOwogICAgfQoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIGxpa2UgYF8ubG93ZXJGaXJzdGAuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBtZXRob2ROYW1lIFRoZSBuYW1lIG9mIHRoZSBgU3RyaW5nYCBjYXNlIG1ldGhvZCB0byB1c2UuCiAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBjYXNlIGZ1bmN0aW9uLgogICAgICovCiAgICBmdW5jdGlvbiBjcmVhdGVDYXNlRmlyc3QobWV0aG9kTmFtZSkgewogICAgICByZXR1cm4gZnVuY3Rpb24oc3RyaW5nKSB7CiAgICAgICAgc3RyaW5nID0gdG9TdHJpbmcoc3RyaW5nKTsKCiAgICAgICAgdmFyIHN0clN5bWJvbHMgPSBoYXNVbmljb2RlKHN0cmluZykKICAgICAgICAgID8gc3RyaW5nVG9BcnJheShzdHJpbmcpCiAgICAgICAgICA6IHVuZGVmaW5lZDsKCiAgICAgICAgdmFyIGNociA9IHN0clN5bWJvbHMKICAgICAgICAgID8gc3RyU3ltYm9sc1swXQogICAgICAgICAgOiBzdHJpbmcuY2hhckF0KDApOwoKICAgICAgICB2YXIgdHJhaWxpbmcgPSBzdHJTeW1ib2xzCiAgICAgICAgICA/IGNhc3RTbGljZShzdHJTeW1ib2xzLCAxKS5qb2luKCcnKQogICAgICAgICAgOiBzdHJpbmcuc2xpY2UoMSk7CgogICAgICAgIHJldHVybiBjaHJbbWV0aG9kTmFtZV0oKSArIHRyYWlsaW5nOwogICAgICB9OwogICAgfQoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIGxpa2UgYF8uY2FtZWxDYXNlYC4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtGdW5jdGlvbn0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ICAgICAgICAgICAgICAgICFkYXRhWzRdLmxlbmd0aCAmJiBkYXRhWzldID09IDEKICAgICAgICAgICAgICApIHsKICAgICAgICAgICAgd3JhcHBlciA9IHdyYXBwZXJbZ2V0RnVuY05hbWUoZGF0YVswXSldLmFwcGx5KHdyYXBwZXIsIGRhdGFbM10pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgd3JhcHBlciA9IChmdW5jLmxlbmd0aCA9PSAxICYmIGlzTGF6aWFibGUoZnVuYykpCiAgICAgICAgICAgICAgPyB3cmFwcGVyW2Z1bmNOYW1lXSgpCiAgICAgICAgICAgICAgOiB3cmFwcGVyLnRocnUoZnVuYyk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKICAgICAgICAgIHZhciBhcmdzID0gYXJndW1lbnRzLAogICAgICAgICAgICAgIHZhbHVlID0gYXJnc1swXTsKCiAgICAgICAgICBpZiAod3JhcHBlciAmJiBhcmdzLmxlbmd0aCA9PSAxICYmIGlzQXJyYXkodmFsdWUpKSB7CiAgICAgICAgICAgIHJldHVybiB3cmFwcGVyLnBsYW50KHZhbHVlKS52YWx1ZSgpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGluZGV4ID0gMCwKICAgICAgICAgICAgICByZXN1bHQgPSBsZW5ndGggPyBmdW5jc1tpbmRleF0uYXBwbHkodGhpcywgYXJncykgOiB2YWx1ZTsKCiAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgICAgICByZXN1bHQgPSBmdW5jc1tpbmRleF0uY2FsbCh0aGlzLCByZXN1bHQpOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICB9OwogICAgICB9KTsKICAgIH0KCiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IHdyYXBzIGBmdW5jYCB0byBpbnZva2UgaXQgd2l0aCBvcHRpb25hbCBgdGhpc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ICAgaWYgKGN1c3RvbWl6ZXIpIHsKICAgICAgICAgIHZhciBjb21wYXJlZCA9IGlzUGFydGlhbAogICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIGFyclZhbHVlLCBpbmRleCwgb3RoZXIsIGFycmF5LCBzdGFjaykKICAgICAgICAgICAgOiBjdXN0b21pemVyKGFyclZhbHVlLCBvdGhWYWx1ZSwgaW5kZXgsIGFycmF5LCBvdGhlciwgc3RhY2spOwogICAgICAgIH0KICAgICAgICBpZiAoY29tcGFyZWQgIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgaWYgKGNvbXBhcmVkKSB7CiAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgfQogICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS4KICAgICAgICBpZiAoc2VlbikgewogICAgICAgICAgaWYgKCFhcnJheVNvbWUob3RoZXIsIGZ1bmN0aW9uKG90aFZhbHVlLCBvdGhJbmRleCkgewogICAgICAgICAgICAgICAgaWYgKCFjYWNoZUhhcyhzZWVuLCBvdGhJbmRleCkgJiYKICAgICAgICAgICAgICAgICAgICAoYXJyVmFsdWUgPT09IG90aFZhbHVlIHx8IGVxdWFsRnVuYyhhcnJWYWx1ZSwgb3RoVmFsdWUsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIHN0YWNrKSkpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlZW4ucHVzaChvdGhJbmRleCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSkpIHsKICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgIH0gZWxzZSBpZiAoISgKICAgICAgICAgICAgICBhcnJWY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CiAgICAgICAgICBjb252ZXJ0IHx8IChjb252ZXJ0ID0gc2V0VG9BcnJheSk7CgogICAgICAgICAgaWYgKG9iamVjdC5zaXplICE9IG90aGVyLnNpemUgJiYgIWlzUGFydGlhbCkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICAvLyBBc3N1bWUgY3ljbGljIHZhbHVlcyBhcmUgZXF1YWwuCiAgICAgICAgICB2YXIgc3RhY2tlZCA9IHN0YWNrLmdldChvYmplY3QpOwogICAgICAgICAgaWYgKHN0YWNrZWQpIHsKICAgICAgICAgICAgcmV0dXJuIHN0YWNrZWQgPT0gb3RoZXI7CiAgICAgICAgICB9CiAgICAgICAgICBiaXRtYXNrIHw9IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUc7CgogICAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7CiAgICAgICAgICB2YXIgcmVzdWx0ID0gZXF1YWxBcnJheXMoY29udmVydChvYmplY3QpLCBjb252ZXJ0KG90aGVyKSwgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjayk7CiAgICAgICAgICBzdGFja1snZGVsZXRlJ10ob2JqZWN0KTsKICAgICAgICAgIHJldHVybiByZXN1bHQ7CgogICAgICAgIGNhc2Ugc3ltYm9sVGFnOgogICAgICAgICAgaWYgKHN5bWJvbFZhbHVlT2YpIHsKICAgICAgICAgICAgcmV0dXJuIHN5bWJvbFZhbHVlT2YuY2FsbChvYmplY3QpID09IHN5bWJvbFZhbHVlT2YuY2FsbChvdGhlcik7CiAgICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQoKICAgIC8qKgogICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBiYXNlSXN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9IG9ialByb3BzLmxlbmd0aCwKICAgICAgICAgIG90aFByb3BzID0gZ2V0QWxsS2V5cyhvdGhlciksCiAgICAgICAgICBvdGhMZW5ndGggPSBvdGhQcm9wcy5sZW5ndGg7CgogICAgICBpZiAob2JqTGVuZ3RoICE9IG90aExlbmd0aCAmJiAhaXNQYXJ0aWFsKSB7CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICB9CiAgICAgIHZhciBpbmRleCA9IG9iakxlbmd0aDsKICAgICAgd2hpbGUgKGluZGV4LS0pIHsKICAgICAgICB2YXIga2V5ID0gb2JqUHJvcHNbaW5kZXhdOwogICAgICAgIGlmICghKGlzUGFydGlhbCA/IGtleSBpbiBvdGhlciA6IGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsIGtleSkpKSB7CiAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICB9CiAgICAgIC8vIEFzc3VtZSBjeWNsaWMgdmFsdWVzIGFyZSBlcXVhbC4KICAgICAgdmFyIHN0YWNrZWQgPSBzdGFjay5nZXQob2JqZWN0KTsKICAgICAgaWYgKHN0YWNrZWQgJiYgc3RhY2suZ2V0KG90aGVyKSkgewogICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyOwogICAgICB9CiAgICAgIHZhciByZXN1bHQgPSB0cnVlOwogICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7CiAgICAgIHN0YWNrLnNldChvdGhlciwgb2JqZWN0KTsKCiAgICAgIHZhciBza2lwQ3RvciA9IGlzUGFydGlhbDsKICAgICAgd2hpbGUgKCsraW5kZXggPCBvYmpMZW5ndGgpIHsKICAgICAgICBrZXkgPSBvYmpQcm9wc1tpbmRleF07CiAgICAgICAgdmFyIG9ialZhbHVlID0gb2JqZWN0W2tleV0sCiAgICAgICAgICAgIG90aFZhbHVlID0gb3RoZXJba2V5XTsKCiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHsKICAgICAgICAgIHZhciBjb21wYXJlZCA9IGlzUGFydGlhbAogICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIG9ialZhbHVlLCBrZXksIG90aGVyLCBvYmplY3QsIHN0YWNrKQogICAgICAgICAgICA6IGN1c3RvbWl6ZXIob2JqVmFsdWUsIG90aFZhbHVlLCBrZXksIG9iamVjdCwgb3RoZXIsIHN0YWNrKTsKICAgICAgICB9CiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuCiAgICAgICAgaWYgKCEoY29tcGFyZWQgPT09IHVuZGVmaW5lZAogICAgICAgICAgICAgID8gKG9ialZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMob2JqVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpCiAgICAgICAgICAgICAgOiBjb21wYXJlZAogICAgICAgICAgICApKSB7CiAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBza2lwQ3RvciB8fCAoc2tpcEN0b3IgPSBrZXkgPT0gJ2NvbnN0cnVjdG9yJyk7CiAgICAgIH0KICAgICAgaWYgKHJlc3VsdCAmJiAhc2tpcEN0b3IpIHsKICAgICAgICB2YXIgb2JqQ3RvciA9IG9iamVjdC5jb25zdHJ1Y3RvciwKICAgICAgICAgICAgb3RoQ3RvciA9IG90aGVyLmNvbnN0cnVjdG9yOwoKICAgICAgICAvLyBOb24gYE9iamVjdGAgb2JqZWN0IGluc3RhbmNlcyB3aXRoIGRpZmZlcmVudCBjb25zdHJ1Y3RvcnMgYXJlIG5vdCBlcXVhbC4KICAgICAgICBpZiAob2JqQ3RvciAhPSBvdGhDdG9yICYmCiAgICAgICAgICAgICgnY29uc3RydWN0b3InIGluIG9iamVjdCAmJiAnY29uc3RydWN0b3InIGluIG90aGVyKSAmJgogICAgICAgICAgIC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GVydHkgbmFtZXMgYW5kIHN5bWJvbHMuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGdldEFsbEtleXMob2JqZWN0KSB7CiAgICAgIHJldHVybiBiYXNlR2V0QWxsS2V5cyhvYmplY3QsIGtleXMsIGdldFN5bWJvbHMpOwogICAgfQoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiBvd24gYW5kIGluaGVyaXRlZCBlbnVtZXJhYmxlIHByb3BlcnR5IG5hbWVzIGFuZAogICAgICogc3ltYm9scyBvZiBgb2JqZWN0YC4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcyBhbmQgc3ltYm9scy4KICAgICAqLwogICAgZnVuY3Rpb24gZ2V0QWxsS2V5c0luKG9iamVjdCkgewogICAgICByZXR1cm4gYmFzZUdldEFsbEtleXMob2JqZWN0LCBrZXlzSW4sIGdldFN5bWJvbHNJbik7CiAgICB9CgogICAgLyoqCiAgICAgKiBHZXRzIG1ldGFkYXRhIGZvciBgZnVuY2AuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIHF1ZXJ5LgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIG1ldGFkYXRhIGZvciBgZnVuY2AuCiAgICAgKi8KICAgIHZhciBnZXREYXRhID0gIW1ldGFNYXAgPyBub29wIDogZnVuY3Rpb24oZnVuYykgewogICAgICByZXR1cm4gbWV0YU1hcC5nZXQoZnVuYyk7CiAgICB9OwoKICAgIC8qKgogICAgICogR2V0cyB0aGUgbmFtZSBvZiBgZnVuY2AuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7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5nVGFnXSA9IHVuZGVmaW5lZDsKICAgICAgICB2YXIgdW5tYXNrZWQgPSB0cnVlOwogICAgICB9IGNhdGNoIChlKSB7fQoKICAgICAgdmFyIHJlc3VsdCA9IG5hdGl2ZU9iamVjdFRvU3RyaW5nLmNhbGwodmFsdWUpOwogICAgICBpZiAodW5tYXNrZWQpIHsKICAgICAgICBpZiAoaXNPd24pIHsKICAgICAgICAgIHZhbHVlW3N5bVRvU3RyaW5nVGFnXSA9IHRhZzsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZGVsZXRlIHZhbHVlW3N5bVRvU3RyaW5nVGFnXTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvKioKICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgdGhlIG93biBlbnVtZXJhYmxlIHN5bWJvbHMgb2YgYG9iamVjdGAuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgYXJyYXkgb2Ygc3ltYm9scy4KICAgICAqLwogICAgdmFyIGdldFN5bWJvbHMgPSAhbmF0aXZlR2V0U3ltYm9scyA/IHN0dWJBcnJheSA6IGZ1bmN0aW9uKG9iamVjdCkgewogICAgICBpZiAob2JqZWN0ID09IG51bGwpIHsKICAgICAgICByZXR1cm4gW107CiAgICAgIH0KICAgICAgb2JqZWN0ID0gT2JqZWN0KG9iamVjdCk7CiAgICAgIHJldHVybiBhcnJheUZpbHRlcihuYXRpdmVHZXRTeW1ib2xzKG9iamVjdCksIGZ1bmN0aW9uKHN5bWJvbCkgewogICAgICAgIHJldHVybiBwcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKG9iamVjdCwgc3ltYm9sKTsKICAgICAgfSk7CiAgICB9OwoKICAgIC8qKgogICAgICogQ3JlYXRlc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RoKHBhdGgsIG9iamVjdCk7CgogICAgICB2YXIgaW5kZXggPSAtMSwKICAgICAgICAgIGxlbmd0aCA9IHBhdGgubGVuZ3RoLAogICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CgogICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgIHZhciBrZXkgPSB0b0tleShwYXRoW2luZGV4XSk7CiAgICAgICAgaWYgKCEocmVzdWx0ID0gb2JqZWN0ICE9IG51bGwgJiYgaGFzRnVuYyhvYmplY3QsIGtleSkpKSB7CiAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgb2JqZWN0ID0gb2JqZWN0W2tleV07CiAgICAgIH0KICAgICAgaWYgKHJlc3VsdCB8fCArK2luZGV4ICE9IGxlbmd0aCkgewogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KICAgICAgbGVuZ3RoID0gb2JqZWN0ID09IG51bGwgPyAwIDogb2JqZWN0Lmxlbmd0aDsKICAgICAgcmV0dXJuICEhbGVuZ3RoICYmIGlzTGVuZ3RoKGxlbmd0aCkgJiYgaXNJbmRleChrZXksIGxlbmd0aCkgJiYKICAgICAgICAoaXNBcnJheShvYmplY3QpIHx8IGlzQXJndW1lbnRzKG9iamVjdCkpOwogICAgfQoKICAgIC8qKgogICAgICogSW5pdGlhbGl6ZXMgYW4gYXJyYXkgY2xvbmUuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBjbG9uZS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgaW5pdGlhbGl6ZWQgY2xvbmUuCiAgICAgKi8KICAgIGZ1bmN0aW9uIGluaXRDbG9uZUFycmF5KGFycmF5KSB7CiAgICAgIHZhciBsZW5ndGggPSBhcnJheS5sZW5ndGgsCiAgICAgICAgICByZXN1bHQgPSBuZXcgYXJyYXkuY29uc3RydWN0b3IobGVuZ3RoKTsKC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KCiAgICAgICAgY2FzZSBtYXBUYWc6CiAgICAgICAgICByZXR1cm4gbmV3IEN0b3I7CgogICAgICAgIGNhc2UgbnVtYmVyVGFnOgogICAgICAgIGNhc2Ugc3RyaW5nVGFnOgogICAgICAgICAgcmV0dXJuIG5ldyBDdG9yKG9iamVjdCk7CgogICAgICAgIGNhc2UgcmVnZXhwVGFnOgogICAgICAgICAgcmV0dXJuIGNsb25lUmVnRXhwKG9iamVjdCk7CgogICAgICAgIGNhc2Ugc2V0VGFnOgogICAgICAgICAgcmV0dXJuIG5ldyBDdG9yOwoKICAgICAgICBjYXNlIHN5bWJvbFRhZzoKICAgICAgICAgIHJldHVybiBjbG9uZVN5bWJvbChvYmplY3QpOwogICAgICB9CiAgICB9CgogICAgLyoqCiAgICAgKiBJbnNlcnRzIHdyYXBwZXIgYGRldGFpbHNgIGluIGEgY29tbWVudCBhdCB0aGUgdG9wIG9mIHRoZSBgc291cmNlYCBib2R5LgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0ge3N0cmluZ30gc291cmNlIFRoZSBzb3VyY2UgdG8gbW9kaWZ5LgogICAgICogQHJldHVybnMge0FycmF5fSBkZXRhaWxzIFRoZSBkZXRhaWxzIHRvIGluc2VydC4KICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IFJldHVybnMgdGhlIG1vZGlmaWVkIHNvdXJjZS4KICAgICAqLwogICAgZnVuY3Rpb24gaW5zZXJ0V3JhcERldGFpbHMoc291cmNlLCBkZXRhaWxzKSB7CiAgICAgIHZhciBsZW5ndGggPSBkZXRhaWxzLmxlbmd0aDsKICAgICAgaWYgKCFsZW5ndGgpIHsKICAgICAgICByZXR1cm4gc291cmNlOwogICAgICB9CiAgICAgIHZhciBsYXN0SW5kZXggPSBsZW5ndGggLSAxOwogICAgICBkZXRhaWxzW2xhc3RJbmRleF0gPSAobGVuZ3RoID4gMSA/ICcmICcgOiAnJykgKyBkZXRhaWxzW2xhc3RJbmRleF07CiAgICAgI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0dHA6Ly9lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLW9iamVjdC5rZXlzKQogICAgICogZXhjZXB0IHRoYXQgaXQgaW5jbHVkZXMgaW5oZXJpdGVkIGVudW1lcmFibGUgcHJvcGVydGllcy4KICAgICAqCiAgICAgKiBAcHJpdmF0ZQogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcy4KICAgICAqLwogICAgZnVuY3Rpb24gbmF0aXZlS2V5c0luKG9iamVjdCkgewogICAgICB2YXIgcmVzdWx0ID0gW107CiAgICAgIGlmIChvYmplY3QgIT0gbnVsbCkgewogICAgICAgIGZvciAodmFyIGtleSBpbiBPYmplY3Qob2JqZWN0KSkgewogICAgICAgICAgcmVzdWx0LnB1c2goa2V5KTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvKioKICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYSBzdHJpbmcgdXNpbmcgYE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmdgLgogICAgICoKICAgICAqIEBwcml2YXRlCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgY29udmVydGVkIHN0cmluZy4KICAgICAqLwogICAgZnVuY3Rpb24gb2JqZWN0VG9TdHJpbmcodmFsdWUpIHsKICAgICAgcmV0dXJuIG5hdGl2ZU9iamVjdFRvU3RyaW5nLmNhbGwodmFsdWUpOwogICAgfQoKICAgIC8qKgogICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBiYXNlUmVzdGAgd2hpY2ggdHJhbnNmb3JtcyB0aGUgcmVzd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AgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgc291cmNlIGNvZGUuCiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvU291cmNlKGZ1bmMpIHsKICAgICAgaWYgKGZ1bmMgIT0gbnVsbCkgewogICAgICAgIHRyeSB7CiAgICAgICAgICByZXR1cm4gZnVuY1RvU3RyaW5nLmNhbGwoZnVuYyk7CiAgICAgICAgfSBjYXRjaCAoZSkge30KICAgICAgICB0cnkgewogICAgICAgICAgcmV0dXJuIChmdW5jICsgJycpOwogICAgICAgIH0gY2F0Y2ggKGUpIHt9CiAgICAgIH0KICAgICAgcmV0dXJuICcnOwogICAgfQoKICAgIC8qKgogICAgICogVXBkYXRlcyB3cmFwcGVyIGBkZXRhaWxzYCBiYXNlZCBvbiBgYml0bWFza2AgZmxhZ3MuCiAgICAgKgogICAgICogQHByaXZhdGUKICAgICAqIEByZXR1cm5zIHtBcnJheX0gZGV0YWlscyBUaGUgZGV0YWlscyB0byBtb2RpZnkuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gYml0bWFzayBUaGUgYml0bWFzayBmbGFncy4gU2VlIGBjcmVhdGVXcmFwYCBmb3IgbW9yZSBkZXRhaWxzLgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBkZXRhaWxzYC4KICAgICAqLwogICAgZnVuY3Rpb24gdXBkYXRlV3JhcERldGFpbHMoZGV0YWlscywgYml0bWFzaykgewogICAgICBhcnJheUVhY2god3JhcEZsYWdzLCBmdW5jdGlvbihwYWlyKSB7CiAgICAgICAgdmFyIHZhbHVlID0gJ18uJyArIHBhaXJbMF07CiAgICAgICAgaWYgKChiaXRtYXNrICYgcGFpclsxXSkgJiYgIWFycmF5SW5jbHVkZXMoZGV0YWlscywgdmFsdWUpKSB7CiAgICAgICAgICBkZXRhaWxzLnB1c2godmFsdWUpOwogICAgICAgIH0KICAgICAgfSk7CiAgICAgIHJldHVybiBkZXRhaWxzLnNvcnQoKTsKICAgIH0KCiAgIC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AgICAgIH0KICAgICAgdmFyIGluZGV4ID0gMCwKICAgICAgICAgIHJlc0luZGV4ID0gMCwKICAgICAgICAgIHJlc3VsdCA9IEFycmF5KG5hdGl2ZUNlaWwobGVuZ3RoIC8gc2l6ZSkpOwoKICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgcmVzdWx0W3Jlc0luZGV4KytdID0gYmFzZVNsaWNlKGFycmF5LCBpbmRleCwgKGluZGV4ICs9IHNpemUpKTsKICAgICAgfQogICAgICByZXR1cm4gcmVzdWx0OwogICAgfQoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBhcnJheSB3aXRoIGFsbCBmYWxzZXkgdmFsdWVzIHJlbW92ZWQuIFRoZSB2YWx1ZXMgYGZhbHNlYCwgYG51bGxgLAogICAgICogYDBgLCBgIiJgLCBgdW5kZWZpbmVkYCwgYW5kIGBOYU5gIGFyZSBmYWxzZXkuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gY29tcGFjdC4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIGZpbHRlcmVkIHZhbHVlcy4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5jb21wYWN0KFswLCAxLCBmYWxzZSwgMiwgJycsIDNdKTsKICAgICAqIC8vID0+IFsxLCAyLCAzXQogICAgICovCiAgICBmdW5jdGlvbiBjb21wYWN0KGFycmF5KSB7CiAgICAgIHZhciBpbmRleCA9IC0xLAogICAgICAgICAgbGVuZ3RoID0gYXJyYXkgPT0gbnVsbCA/IDAgOiBhcnJheS5sZW5ndGgsCiAgICAgICAgICByZXNJbmRleCA9IDAsCiAgICAgICAgICByZXN1bHQgPSBbXTsKCiAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CiAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdOwogICAgICAgIGlmICh2YWx1ZSkgewogICAgICAgICAgcmVzdWx0W3Jlc0luZGV4KytdID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiByZXN1bHQ7CiAgICB9CgogICAgLyoqCiAgICAgKiBDcmVhdGVzIGEgbmV3IGFycmF5IGNvbmNhdGVuYXRpbmcgYGFycmF5YCB3aXRoIGFueSBhZGRpdGlvbmFsIGFycmF5cwogICAgICogYW5kL29yIHZhbHVlcy4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMC4wCiAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBjb25jYXRlbmF0ZS4KICAgICAqIEBwYXJhbSB7Li4uKn0gW3ZhbHVlc10gVGhlIHZhbHVlcyB0byBjb25jYXRlbmF0ZS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGNvbmNhdGVuYXRlZCBhcnJheS4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogdmFyIGFycmF5ID0gWzFdOwogICAgICogdmFyIG90aGVyID0gXy5jb25jYXQoYXJyYXksIDIsIFszXSwgW1s0XV0pOwogICAgICoKICAgICAqIGNvbnNvbGUubG9nKG90aGVyKTsKICAgICAqIC8vID0+IFsxLCAyLCAzLCBbNF1dCiAgICAgKgogICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICogLy8gPT4gWzFdCiAgICAgKi8KICAgIGZ1bmN0aW9uIGNvbmNhdCgpIHsKICAgICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGg7CiAgICAgIGlmICghbGVuZ3RoKSB7CiAgICAgICAgcmV0dXJuIFtdOw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ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICBpZiAoIWxlbmd0aCkgewogICAgICAgIHJldHVybiAtMTsKICAgICAgfQogICAgICB2YXIgaW5kZXggPSBsZW5ndGg7CiAgICAgIGlmIChmcm9tSW5kZXggIT09IHVuZGVmaW5lZCkgewogICAgICAgIGluZGV4ID0gdG9JbnRlZ2VyKGZyb21JbmRleCk7CiAgICAgICAgaW5kZXggPSBpbmRleCA8IDAgPyBuYXRpdmVNYXgobGVuZ3RoICsgaW5kZXgsIDApIDogbmF0aXZlTWluKGluZGV4LCBsZW5ndGggLSAxKTsKICAgICAgfQogICAgICByZXR1cm4gdmFsdWUgPT09IHZhbHVlCiAgICAgICAgPyBzdHJpY3RMYXN0SW5kZXhPZihhcnJheSwgdmFsdWUsIGluZGV4KQogICAgICAgIDogYmFzZUZpbmRJbmRleChhcnJheSwgYmFzZUlzTmFOLCBpbmRleCwgdHJ1ZSk7CiAgICB9CgogICAgLyoqCiAgICAgKiBHZXRzIHRoZSBlbGVtZW50IGF0IGluZGV4IGBuYCBvZiBgYXJyYXlgLiBJZiBgbmAgaXMgbmVnYXRpdmUsIHRoZSBudGgKICAgICAqIGVsZW1lbnQgZnJvbSB0aGUgZW5kIGlzIHJldHVybmVkLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4xMS4wCiAgICAgKiBAY2F0ZWdvcnkgQXJyYXkKICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS4KICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbbj0wXSBUaGUgaW5kZXggb2YgdGhlIGVsZW1lbnQgdG8gcmV0dXJuLgogICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIG50aCBlbGVtZW50IG9mIGBhcnJheWAuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBhcnJheSA9IFsnYScsICdiJywgJ2MnLCAnZCddOwogICAgICoKICAgICAqIF8ubnRoKGFycmF5LCAxKTsKICAgICAqIC8vID0+ICdiJwogICAgICoKICAgICAqIF8ubnRoKGFycmF5LCAtMik7CiAgICAgKiAvLyA9PiAnYyc7CiAgICAgKi8KICAgIGZ1bmN0aW9uIG50aChhcnJheSwgbikgewogICAgICByZXR1cm4gKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkgPyBiYXNlTnRoKGFycmF5LCB0b0ludGVnZXIobikpIDogdW5kZWZpbmVkOwogICAgfQoKICAgIC8qKgogICAgICogUmVtb3ZlcyBhbGwgZ2l2ZW4gdmFsdWVzIGZyb20gYGFycmF5YCB1c2luZwogICAgICogW2BTYW1lVmFsdWVaZXJvYF0oaHR0cDovL2VjbWEtaW50ZXJuYXRpb25hbC5vcmcvZWNtYS0yNjIvNy4wLyNzZWMtc2FtZXZhbHVlemVybykKICAgICAqIGZvciBlcXVhbGl0eSBjb21wYXJpc29ucy4KICAgICAqCiAgICAgKiAqKk5vdGU6KiogVW5saWtlIGBfLndpdGhvdXRgLCB0aGlzIG1ldGhvZCBtdXRhdGVzIGBhcnJheWAuIFVzZSBgXy5yZW1vdmVgCiAgICAgKiB0byByZW1vdmUgZWxlbWVudHMgZnJvbSBhbiBhcnJheSBieSBwcmVkaWNhdGUuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAyLjAuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gbW9kaWZ5LgogICAgICogQHBhcmFtIHsuLi4qfSBbdmFsdWVzXSBUaGUgdmFsdWVzIHRvIHJlbW92ZS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiB2YXIgYXJyYXkgPSBbJ2EnLCAnYicsICdjJywgJ2EnLCAnYicsICdjJ107CiAgICAgKgogICAgICogXy5wdWxsKGFycmF5LCAnYScsICdjJyk7CiAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7CiAgICAgKiAvLyA9PiBbJ2InLCAnYiddCiAgICAgKi8KICAgIHZhciBwdWxsID0gYmFzZVJlc3QocHVsbEFsbCk7CgogICAgLyoqCiAgICAgKiBUaGlzIG1ldGhvZCBpcyBsaWtlIGBfLnB1bGxgIGV4Y2VwdCB0aGF0IGl0IGFjY2VwdHMgYW4gYXJyYXkgb2YgdmFsdWVzIHRvIHJlbW92ZS4KICAgICAqCiAgICAgKiAqKk5vdGU6KiogVW5saWtlIGBfLmRpZmZlcmVuY2VgLCB0aGlzIG1ldGhvZCBtdXRhdGVzIGBhcnJheWAuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSA0LjAuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gbW9kaWZ5LgogICAgICogQHBhcmFtIHtBcnJheX0gdmFsdWVzIFRoZSB2YWx1ZXMgdG8gcmVtb3ZlLgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBhcnJheWAuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBhcnJheSA9IFsnYScsICdiJywgJ2MnLCAnYScsICdiJywgJ2MnXTsKICAgICAqCiAgICAgKiBfLnB1bGxBbGwoYXJyYXksIFsnYScsICdjJ10pOwogICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICogLy8gPT4gWydiJywgJ2InXQogICAgICovCiAgICBmdW5jdGlvbiBwdWxsQWxsKGFycmF5LCB2YWx1ZXMpIHsKICAgICAgcmV0dXJuIChhcnJheSAmJiBhcnJheS5sZW5ndGggJiYgdmFsdWVzICYmIHZhbHVlcy5sZW5ndGgpCiAgICAgICAgPyBiYXNlUHVsbEFsbChhcnJ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zLiBUaGUgcHJlZGljYXRlIGlzIGludm9rZWQKICAgICAqIHdpdGggdGhyZWUgYXJndW1lbnRzOiAodmFsdWUsIGluZGV4LCBhcnJheSkuCiAgICAgKgogICAgICogKipOb3RlOioqIFVubGlrZSBgXy5maWx0ZXJgLCB0aGlzIG1ldGhvZCBtdXRhdGVzIGBhcnJheWAuIFVzZSBgXy5wdWxsYAogICAgICogdG8gcHVsbCBlbGVtZW50cyBmcm9tIGFuIGFycmF5IGJ5IHZhbHVlLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgMi4wLjAKICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIG1vZGlmeS4KICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgbmV3IGFycmF5IG9mIHJlbW92ZWQgZWxlbWVudHMuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBhcnJheSA9IFsxLCAyLCAzLCA0XTsKICAgICAqIHZhciBldmVucyA9IF8ucmVtb3ZlKGFycmF5LCBmdW5jdGlvbihuKSB7CiAgICAgKiAgIHJldHVybiBuICUgMiA9PSAwOwogICAgICogfSk7CiAgICAgKgogICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICogLy8gPT4gWzEsIDNdCiAgICAgKgogICAgICogY29uc29sZS5sb2coZXZlbnMpOwogICAgICogLy8gPT4gWzIsIDRdCiAgICAgKi8KICAgIGZ1bmN0aW9uIHJlbW92ZShhcnJheSwgcHJlZGljYXRlKSB7CiAgICAgIHZhciByZXN1bHQgPSBbXTsKICAgICAgaWYgKCEoYXJyYXkgJiYgYXJyYXkubGVuZ3RoKSkgewogICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgIH0KICAgICAgdmFyIGluZGV4ID0gLTEsCiAgICAgICAgICBpbmRleGVzID0gW10sCiAgICAgICAgICBsZW5ndGggPSBhcnJheS5sZW5ndGg7CgogICAgICBwcmVkaWNhdGUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpOwogICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgewogICAgICAgIHZhciB2YWx1ZSA9IGFycmF5W2luZGV4XTsKICAgICAgICBpZiAocHJlZGljYXRlKHZhbHVlLCBpbmRleCwgYXJyYXkpKSB7CiAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7CiAgICAgICAgICBpbmRleGVzLnB1c2goaW5kZXgpOwogICAgICAgIH0KICAgICAgfQogICAgICBiYXNlUHVsbEF0KGFycmF5LCBpbmRleGVzKTsKICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvKioKICAgICAqIFJldmVyc2VzIGBhcnJheWAgc28gdGhhdCB0aGUgZmlyc3QgZWxlbWVudCBiZWNvbWVzIHRoZSBsYXN0LCB0aGUgc2Vjb25kCiAgICAgKiBlbGVtZW50IGJlY29tZXMgdGhlIHNlY29uZCB0byBsYXN0LCBhbmQgc28gb24uCiAgICAgKgogICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIG11dGF0ZXMgYGFycmF5YCBhbmQgaXMgYmFzZWQgb24KICAgICAqIFtgQXJyYXkjcmV2ZXJzZWBdKGh0dHBzOi8vbWRuLmlvL0FycmF5L3JldmVyc2UpLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIG1vZGlmeS4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBgYXJyYXlgLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgM107CiAgICAgKgogICAgICogXy5yZXZlcnNlKGFycmF5KTsKICAgICAqIC8vID0+IFszLCAyLCAxXQogICAgICoKICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAqIC8vID0+IFszLCAyLCAxXQogICAgICovCiAgICBmdW5jdGlvbiByZXZlcnNlKGFycmF5KSB7CiAgICAgIHJldHVybiBhcnJheSA9PSBudWxsID8gYXJyYXkgOiBuYXRpdmVSZXZlcnNlLmNhbGwoYXJyYXkpOwogICAgfQoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhIHNsaWNlIG9mIGBhcnJheWAgZnJvbSBgc3RhcnRgIHVwIHRvLCBidXQgbm90IGluY2x1ZGluZywgYGVuZGAuCiAgICAgKgogICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIGlzIHVzZWQgaW5zdGVhZCBvZgogICAgICogW2BBcnJheSNzbGljZWBdKGh0dHBzOi8vbWRuLmlvL0FycmF5L3NsaWNlKSB0byBlbnN1cmUgZGVuc2UgYXJyYXlzIGFyZQogICAgICogcmV0dXJuZWQuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAzLjAuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gc2xpY2UuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gW3N0YXJ0PTBdIFRoZSBzdGFydCBwb3NpdGlvbi4KICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbZW5kPWFycmF5Lmxlbmd0aF0gVGhlIGVuZCBwb3NpdGlvbi4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgc2xpY2Ugb2YgYGFycmF5YC4KICAgICAqLwogICAgZnVuY3Rpb24gc2xpY2UoYXJyYXks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gICAqIF8uc29ydGVkTGFzdEluZGV4T2YoWzQsIDUsIDUsIDUsIDZdLCA1KTsKICAgICAqIC8vID0+IDMKICAgICAqLwogICAgZnVuY3Rpb24gc29ydGVkTGFzdEluZGV4T2YoYXJyYXksIHZhbHVlKSB7CiAgICAgIHZhciBsZW5ndGggPSBhcnJheSA9PSBudWxsID8gMCA6IGFycmF5Lmxlbmd0aDsKICAgICAgaWYgKGxlbmd0aCkgewogICAgICAgIHZhciBpbmRleCA9IGJhc2VTb3J0ZWRJbmRleChhcnJheSwgdmFsdWUsIHRydWUpIC0gMTsKICAgICAgICBpZiAoZXEoYXJyYXlbaW5kZXhdLCB2YWx1ZSkpIHsKICAgICAgICAgIHJldHVybiBpbmRleDsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIC0xOwogICAgfQoKICAgIC8qKgogICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy51bmlxYCBleGNlcHQgdGhhdCBpdCdzIGRlc2lnbmVkIGFuZCBvcHRpbWl6ZWQKICAgICAqIGZvciBzb3J0ZWQgYXJyYXlzLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBBcnJheQogICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGluc3BlY3QuCiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBkdXBsaWNhdGUgZnJlZSBhcnJheS4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5zb3J0ZWRVbmlxKFsxLCAxLCAyXSk7CiAgICAgKiAvLyA9PiBbMSwgMl0KICAgICAqLwogICAgZnVuY3Rpb24gc29ydGVkVW5pcShhcnJheSkgewogICAgICByZXR1cm4gKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkKICAgICAgICA/IGJhc2VTb3J0ZWRVbmlxKGFycmF5KQ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WzEsIDJdCiAgICAgKgogICAgICogXy50YWtlKFsxLCAyLCAzXSwgNSk7CiAgICAgKiAvLyA9PiBbMSwgMiwgM10KICAgICAqCiAgICAgKiBfLnRha2UoWzEsIDIsIDNdLCAwKTsKICAgICAqIC8vID0+IFtdCiAgICAgKi8KICAgIGZ1bmN0aW9uIHRha2UoYXJyYXksIG4sIGd1YXJkKSB7CiAgICAgIGlmICghKGFycmF5ICYmIGFycmF5Lmxlbmd0aCkpIHsKICAgICAgICByZXR1cm4gW107CiAgICAgIH0KICAgICAgbiA9IChndWFyZCB8fCBuID09PSB1bmRlZmluZWQpID8gMSA6IHRvSW50ZWdlcihuKTsKICAgICAgcmV0dXJuIGJhc2VTbGljZShhcnJheSwgMCwgbiA8IDAgPyAwIDogbik7CiAgICB9CgogICAgLyoqCiAgICAgKiBDcmVhdGVzIGEgc2xpY2Ugb2YgYGFycmF5YCB3aXRoIGBuYCBlbGVtZW50cyB0YWtlbiBmcm9tIHRoZSBlbmQuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAzLjAuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gcXVlcnkuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MV0gVGhlIG51bWJlciBvZiBlbGVtZW50cyB0byB0YWtlLgogICAgICogQHBhcmFtLSB7T2JqZWN0fSBbZ3VhcmRdIEVuYWJsZXMgdXNlIGFzIGFuIGl0ZXJhdGVlIGZvciBtZXRob2RzIGxpa2UgYF8ubWFwYC4KICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgc2xpY2Ugb2YgYGFycmF5YC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy50YWtlUmlnaHQoWzEsIDIsIDNdKTsKICAgICAqIC8vID0+IFszXQogICAgICoKICAgICAqIF8udGFrZVJpZ2h0KFsxLCAyLCAzXSwgMik7CiAgICAgKiAvLyA9PiBbMiwgM10KICAgICAqCiAgICAgKiBfLnRha2VSaWdodChbMSwgMiwgM10sIDUpOwogICAgICogLy8gPT4gWzEsIDIsIDNdCiAgICAgKgogICAgICogXy50YWtlUmlnaHQoWzEsIDIsIDNdLCAwKTsKICAgICAqIC8vID0+IFtdCiAgICAgKi8KICAgIGZ1bmN0aW9uIHRha2VSaWdodChhcnJheSwgbiwgZ3VhcmQpIHsKICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoOwogICAgICBpZiAoIWxlbmd0aCkgewogICAgICAgIHJldHVybiBbXTsKICAgICAgfQogICAgICBuID0gKGd1YXJkIHx8IG4gPT09IHVuZGVmaW5lZCkgPyAxIDogdG9JbnRlZ2VyKG4pOwogICAgICBuID0gbGVuZ3RoIC0gbjsKICAgICAgcmV0dXJuIGJhc2VTbGljZShhcnJheSwgbiA8IDAgPyAwIDogbiwgbGVuZ3RoKTsKICAgIH0KCiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBzbGljZSBvZiBgYXJyYXlgIHdpdGggZWxlbWVudHMgdGFrZW4gZnJvbSB0aGUgZW5kLiBFbGVtZW50cyBhcmUKICAgICAqIHRha2VuIHVudGlsIGBwcmVkaWNhdGVgIHJldHVybnMgZmFsc2V5LiBUaGUgcHJlZGljYXRlIGlzIGludm9rZWQgd2l0aAogICAgICogdGhyZWUgYXJndW1lbnRzOiAodmFsdWUsIGluZGV4LCBhcnJheSkuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAzLjAuMAogICAgICogQGNhdGVnb3J5IEFycmF5CiAgICAgKiBAcGFyYW0ge0FycmF5fSBhcnJheSBUaGUgYXJyYXkgdG8gcXVlcnkuCiAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbcHJlZGljYXRlPV8uaWRlbnRpdHldIFRoZSB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KTsKICAgICAgfQogICAgICB2YWx1ZSA9IHZhbHVlLnNsaWNlKHN0YXJ0LCArc3RhcnQgKyAobGVuZ3RoID8gMSA6IDApKTsKICAgICAgdmFsdWUuX19hY3Rpb25zX18ucHVzaCh7CiAgICAgICAgJ2Z1bmMnOiB0aHJ1LAogICAgICAgICdhcmdzJzogW2ludGVyY2VwdG9yXSwKICAgICAgICAndGhpc0FyZyc6IHVuZGVmaW5lZAogICAgICB9KTsKICAgICAgcmV0dXJuIG5ldyBMb2Rhc2hXcmFwcGVyKHZhbHVlLCB0aGlzLl9fY2hhaW5fXykudGhydShmdW5jdGlvbihhcnJheSkgewogICAgICAgIGlmIChsZW5ndGggJiYgIWFycmF5Lmxlbmd0aCkgewogICAgICAgICAgYXJyYXkucHVzaCh1bmRlZmluZWQpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gYXJyYXk7CiAgICAgIH0pOwogICAgfSk7CgogICAgLyoqCiAgICAgKiBDcmVhdGVzIGEgYGxvZGFzaGAgd3JhcHBlciBpbnN0YW5jZSB3aXRoIGV4cGxpY2l0IG1ldGhvZCBjaGFpbiBzZXF1ZW5jZXMgZW5hYmxlZC4KICAgICAqCiAgICAgKiBAbmFtZSBjaGFpbgogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IFNlcQogICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGBsb2Rhc2hgIHdyYXBwZXIgaW5zdGFuY2UuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciB1c2VycyA9IFsKICAgICAqICAgeyAndXNlcic6ICdiYXJuZXknLCAnYWdlJzogMzYgfSwKICAgICAqICAgeyAndXNlcic6ICdmcmVkJywgICAnYWdlJzogNDAgfQogICAgICogXTsKICAgICAqCiAgICAgKiAvLyBBIHNlcXVlbmNlIHdpdGhvdXQgZXhwbGljaXQgY2hhaW5pbmcuCiAgICAgKiBfKHVzZXJzKS5oZWFkKCk7CiAgICAgKiAvLyA9PiB7ICd1c2VyJzogJ2Jhcm5leScsICdhZ2UnOiAzNiB9CiAgICAgKgogICAgICogLy8gQSBzZXF1ZW5jZSB3aXRoIGV4cGxpY2l0IGNoYWluaW5nLgogICAgICogXyh1c2VycykKICAgICAqICAgLmNoYWluKCkKICAgICAqICAgLmhlYWQoKQogICAgICogICAucGljaygndXNlcicpCiAgICAgKiAgIC52YWx1ZSgpOwogICAgICogLy8gPT4geyAndXNlcic6ICdiYXJuZXknIH0KICAgICAqLwogICAgZnVuY3Rpb24gd3JhcHBlckNoYWluKCkgewogICAgICByZXR1cm4gY2hhaW4odGhpcyk7CiAgICB9CgogICAgLyoqCiAgICAgKiBFeGVjdXRlcyB0aGUgY2hhaW4gc2VxdWVuY2UgYW5kIHJldHVybnMgdGhlIHdyYXBwZWQgcmVzdWx0LgogICAgICoKICAgICAqIEBuYW1lIGNvbW1pdAogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAzLjIuMAogICAgICogQGNhdGVnb3J5IFNlcQogICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGBsb2Rhc2hgIHdyYXBwZXIgaW5zdGFuY2UuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBhcnJheSA9IFsxLCAyXTsKICAgICAqIHZhciB3cmFwcGVkID0gXyhhcnJheSkucHVzaCgzKTsKICAgICAqCiAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7CiAgICAgKiAvLyA9PiBbMSwgMl0KICAgICAqCiAgICAgKiB3cmFwcGVkID0gd3JhcHBlZC5jb21taXQoKTsKICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAqIC8vID0+IFsxLCAyLCAzXQogICAgICoKICAgICAqIHdyYXBwZWQubGFzdCgpOwogICAgICogLy8gPT4gMwogICAgICoKICAgICAqIGNvbnNvbGUubG9nKGFycmF5KTsKICAgICAqIC8vID0+IFsxLCAyL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cGxhbnQuCiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgYGxvZGFzaGAgd3JhcHBlciBpbnN0YW5jZS4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogZnVuY3Rpb24gc3F1YXJlKG4pIHsKICAgICAqICAgcmV0dXJuIG4gKiBuOwogICAgICogfQogICAgICoKICAgICAqIHZhciB3cmFwcGVkID0gXyhbMSwgMl0pLm1hcChzcXVhcmUpOwogICAgICogdmFyIG90aGVyID0gd3JhcHBlZC5wbGFudChbMywgNF0pOwogICAgICoKICAgICAqIG90aGVyLnZhbHVlKCk7CiAgICAgKiAvLyA9PiBbOSwgMTZdCiAgICAgKgogICAgICogd3JhcHBlZC52YWx1ZSgpOwogICAgICogLy8gPT4gWzEsIDRdCiAgICAgKi8KICAgIGZ1bmN0aW9uIHdyYXBwZXJQbGFudCh2YWx1ZSkgewogICAgICB2YXIgcmVzdWx0LAogICAgICAgICAgcGFyZW50ID0gdGhpczsKCiAgICAgIHdoaWxlIChwYXJlbnQgaW5zdGFuY2VvZiBiYXNlTG9kYXNoKSB7CiAgICAgICAgdmFyIGNsb25lID0gd3JhcHBlckNsb25lKHBhcmVudCk7CiAgICAgICAgY2xvbmUuX19pbmRleF9fID0gMDsKICAgICAgICBjbG9uZS5fX3ZhbHVlc19fID0gdW5kZWZpbmVkOwogICAgICAgIGlmIChyZXN1bHQpIHsKICAgICAgICAgIHByZXZpb3VzLl9fd3JhcHBlZF9fID0gY2xvbmU7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIHJlc3VsdCA9IGNsb25lOwogICAgICAgIH0KICAgICAgICB2YXIgcHJldmlvdXMgPSBjbG9uZTsKICAgICAgICBwYXJlbnQgPSBwYXJlbnQuX193cmFwcGVkX187CiAgICAgIH0KICAgICAgcHJldmlvdXMuX193cmFwcGVkX18gPSB2YWx1ZTsKICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCiAgICAvKioKICAgICAqIFRoaXMgbWV0aG9kIGlzIHRoZSB3cmFwcGVyIHZlcnNpb24gb2YgYF8ucmV2ZXJzZWAuCiAgICAgKgogICAgICogKipOb3RlOioqIFRoaXMgbWV0aG9kIG11dGF0ZXMgdGhlIHdyYXBwZWQgYXJyYXkuCiAgICAgKgogICAgICogQG5hbWUgcmV2ZXJzZQogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IFNlcQogICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGBsb2Rhc2hgIHdyYXBwZXIgaW5zdGFuY2UuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBhcnJheSA9IFsxLCAyLCAzXTsKICAgICAqCiAgICAgKiBfKGFycmF5KS5yZXZlcnNlKCkudmFsdWUoKQogICAgICogLy8gPT4gWzMsIDIsIDFdCiAgICAgKgogICAgICogY29uc29sZS5sb2coYXJyYXkpOwogICAgICogLy8gPT4gWzMsIDIsIDFdCiAgICAgKi8KICAgIGZ1bmN0aW9uIHdyYXBwZXJSZXZlcnNlKCkgewogICAgICB2YXIgdmFsdWUgPSB0aGlzLl9fd3JhcHBlZF9fOwogICAgICBpZiAodmFsdWUgaW5zdGFuY2VvZiBMYXp5V3JhcHBlcikgewogICAgICAgIHZhciB3cmFwcGVkID0gdmFsdWU7CiAgICAgICAgaWYgKHRoaXMuX19hY3Rpb25zX18ubGVuZ3RoKSB7CiAgICAgICAgICB3cmFwcGVkID0gbmV3IExhenlXcmFwcGVyKHRoaXMpOwogICAgICAgIH0KICAgICAgICB3cmFwcGVkID0gd3JhcHBlZC5yZXZlcnNlKCk7CiAgICAgICAgd3JhcHBlZC5fX2FjdGlvbnNfXy5wdXNoKHsKICAgICAgICAgICdmdW5jJzogdGhydSwKICAgICAgICAgICdhcmdzJzogW3JldmVyc2VdLAogICAgICAgICAgJ3RoaXNBcmcnOiB1bmRlZmluZWQKICAgICAgICB9KTs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bcGFydGlhbHNdIFRoZSBhcmd1bWVudHMgdG8gYmUgcGFydGlhbGx5IGFwcGxpZWQuCiAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBib3VuZCBmdW5jdGlvbi4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogdmFyIG9iamVjdCA9IHsKICAgICAqICAgJ3VzZXInOiAnZnJlZCcsCiAgICAgKiAgICdncmVldCc6IGZ1bmN0aW9uKGdyZWV0aW5nLCBwdW5jdHVhdGlvbikgewogICAgICogICAgIHJldHVybiBncmVldGluZyArICcgJyArIHRoaXMudXNlciArIHB1bmN0dWF0aW9uOwogICAgICogICB9CiAgICAgKiB9OwogICAgICoKICAgICAqIHZhciBib3VuZCA9IF8uYmluZEtleShvYmplY3QsICdncmVldCcsICdoaScpOwogICAgICogYm91bmQoJyEnKTsKICAgICAqIC8vID0+ICdoaSBmcmVkIScKICAgICAqCiAgICAgKiBvYmplY3QuZ3JlZXQgPSBmdW5jdGlvbihncmVldGluZywgcHVuY3R1YXRpb24pIHsKICAgICAqICAgcmV0dXJuIGdyZWV0aW5nICsgJ3lhICcgKyB0aGlzLnVzZXIgKyBwdW5jdHVhdGlvbjsKICAgICAqIH07CiAgICAgKgogICAgICogYm91bmQoJyEnKTsKICAgICAqIC8vID0+ICdoaXlhIGZyZWQhJwogICAgICoKICAgICAqIC8vIEJvdW5kIHdpdGggcGxhY2Vob2xkZXJzLgogICAgICogdmFyIGJvdW5kID0gXy5iaW5kS2V5KG9iamVjdCwgJ2dyZWV0JywgXywgJyEnKTsKICAgICAqIGJvdW5kKCdoaScpOwogICAgICogLy8gPT4gJ2hpeWEgZnJlZCEnCiAgICAgKi8KICAgIHZhciBiaW5kS2V5ID0gYmFzZVJlc3QoZnVuY3Rpb24ob2JqZWN0LCBrZXksIHBhcnRpYWxzKSB7CiAgICAgIHZhciBiaXRtYXNrID0gV1JBUF9CSU5EX0ZMQUcgfCBXUkFQX0JJTkRfS0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NlID0gbmV3IEV2ZW50U291cmNlKCcvc3RyZWFtJyk7CiAgICAgKiBqUXVlcnkoc291cmNlKS5vbignbWVzc2FnZScsIGRlYm91bmNlZCk7CiAgICAgKgogICAgICogLy8gQ2FuY2VsIHRoZSB0cmFpbGluZyBkZWJvdW5jZWQgaW52b2NhdGlvbi4KICAgICAqIGpRdWVyeSh3aW5kb3cpLm9uKCdwb3BzdGF0ZScsIGRlYm91bmNlZC5jYW5jZWwpOwogICAgICovCiAgICBmdW5jdGlvbiBkZWJvdW5jZShmdW5jLCB3YWl0LCBvcHRpb25zKSB7CiAgICAgIHZhciBsYXN0QXJncywKICAgICAgICAgIGxhc3RUaGlzLAogICAgICAgICAgbWF4V2FpdCwKICAgICAgICAgIHJlc3VsdCwKICAgICAgICAgIHRpbWVySWQsCiAgICAgICAgICBsYXN0Q2FsbFRpbWUsCiAgICAgICAgICBsYXN0SW52b2tlVGltZSA9IDAsCiAgICAgICAgICBsZWFkaW5nID0gZmFsc2UsCiAgICAgICAgICBtYXhpbmcgPSBmYWxzZSwKICAgICAgICAgIHRyYWlsaW5nID0gdHJ1ZTsKCiAgICAgIGlmICh0eXBlb2YgZnVuYyAhPSAnZnVuY3Rpb24nKSB7CiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihGVU5DX0VSUk9SX1RFWFQpOwogICAgICB9CiAgICAgIHdhaXQgPSB0b051bWJlcih3YWl0KSB8fCAwOwogICAgICBpZiAoaXNPYmplY3Qob3B0aW9ucykpIHsKICAgICAgICBsZWFkaW5nID0gISFvcHRpb25zLmxlYWRpbmc7CiAgICAgICAgbWF4aW5nID0gJ21heFdhaXQnIGluIG9wdGlvbnM7CiAgICAgICAgbWF4V2FpdCA9IG1heGluZyA/IG5hdGl2ZU1heCh0b051bWJlcihvcHRpb25zLm1heFdhaXQpIHx8IDAsIHdhaXQpIDogbWF4V2FpdDsKICAgICAgICB0cmFpbGluZyA9ICd0cmFpbGluZycgaW4gb3B0aW9ucyA/ICEhb3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2FpdCh0aW1lKSk7CiAgICAgIH0KCiAgICAgIGZ1bmN0aW9uIHRyYWlsaW5nRWRnZSh0aW1lKSB7CiAgICAgICAgdGltZXJJZCA9IHVuZGVmaW5lZDsKCiAgICAgICAgLy8gT25seSBpbnZva2UgaWYgd2UgaGF2ZSBgbGFzdEFyZ3NgIHdoaWNoIG1lYW5zIGBmdW5jYCBoYXMgYmVlbgogICAgICAgIC8vIGRlYm91bmNlZCBhdCBsZWFzdCBvbmNlLgogICAgICAgIGlmICh0cmFpbGluZyAmJiBsYXN0QXJncykgewogICAgICAgICAgcmV0dXJuIGludm9rZUZ1bmModGltZSk7CiAgICAgICAgfQogICAgICAgIGxhc3RBcmdzID0gbGFzdFRoaXMgPSB1bmRlZmluZWQ7CiAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gY2FuY2VsKCkgewogICAgICAgIGlmICh0aW1lcklkICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcklkKTsKICAgICAgICB9CiAgICAgICAgbGFzdEludm9rZVRpbWUgPSAwOwogICAgICAgIGxhc3RBcmdzID0gbGFzdENhbGxUaW1lID0gbGFzdFRoaXMgPSB0aW1lcklkID0gdW5kZWZpbmVkOwogICAgICB9CgogICAgICBmdW5jdGlvbiBmbHVzaCgpIHsKICAgICAgICByZXR1cm4gdGltZXJJZCA9PT0gdW5kZWZpbmVkID8gcmVzdWx0IDogdHJhaWxpbmdFZGdlKG5vdygpKTsKICAgICAgfQoKICAgICAgZnVuY3Rpb24gZGVib3VuY2VkKCkgewogICAgICAgIHZhciB0aW1lID0gbm93KCksCiAgICAgICAgICAgIGlzSW52b2tpbmcgPSBzaG91bGRJbnZva2UodGltZSk7CgogICAgICAgIGxhc3RBcmdzID0gYXJndW1lbnRzOwogICAgICAgIGxhc3RUaGlzID0gdGhpczsKICAgICAgICBsYXN0Q2FsbFRpbWUgPSB0aW1lOwoKICAgICAgICBpZiAoaXNJbnZva2luZykgewogICAgICAgICAgaWYgKHRpbWVySWQgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICByZXR1cm4gbGVhZGluZ0VkZ2UobGFzdENhbGxUaW1lKTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChtYXhpbmcpIHsKICAgICAgICAgICAgLy8gSGFuZGxlIGludm9jYXRpb25zIGluIGEgdGlnaHQgbG9vcC4KICAgICAgICAgICAgdGltZXJJZCA9IHNldFRpbWVvdXQodGltZXJFeHBpcmVkLCB3YWl0KTsKICAgICAgICAgICAgcmV0dXJuIGludm9rZUZ1bmMobGFzdENhbGxUaW1lKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKHRpbWVySWQgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgdGltZXJJZCA9IHNldFRpbWVvdXQodGltZXJFeHBpcmVkLCB3YWl0KTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgfQogICAgICBkZWJvdW5jZWQuY2FuY2VsID0gY2FuY2VsOwogICAgICBkZWJvdW5jZWQuZmx1c2ggPSBmbHVzaDsKICAgICAgcmV0dXJuIGRlYm91bmNlZDsKICAgIH0KCiAgICAvKioKICAgICAqIERlZmVycyBpbnZva2luZyB0aGUgYGZ1bmNgIHVudGlsIHRoZSBjdXJyZW50IGNhbGwgc3RhY2sgaGFzIGNsZWFyZWQuIEFueQogICAgICogYWRkaXRpb25hbCBhcmd1bWVudHMgYXJlIHByb3ZpZGVkIHRvIGBmdW5jYCB3aGVuIGl0J3MgaW52b2tlZC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDAuMS4wCiAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb24KICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGRlZmVyLgogICAgICogQHBhcmFtIHsuLi4qfSB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kIGFyZ3VtZW50cyBvdmVyLgogICAgICogQHBhcmFtIHtudW1iZXJ9IFtzdGFydD0wXSBUaGUgc3RhcnQgcG9zaXRpb24gb2YgdGhlIHNwcmVhZC4KICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGZ1bmN0aW9uLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiB2YXIgc2F5ID0gXy5zcHJlYWQoZnVuY3Rpb24od2hvLCB3aGF0KSB7CiAgICAgKiAgIHJldHVybiB3aG8gKyAnIHNheXMgJyArIHdoYXQ7CiAgICAgKiB9KTsKICAgICAqCiAgICAgKiBzYXkoWydmcmVkJywgJ2hlbGxvJ10pOwogICAgICogLy8gPT4gJ2ZyZWQgc2F5cyBoZWxsbycKICAgICAqCiAgICAgKiB2YXIgbnVtYmVycyA9IFByb21pc2UuYWxsKFsKICAgICAqICAgUHJvbWlzZS5yZXNvbHZlKDQwKSwKICAgICAqICAgUHJvbWlzZS5yZXNvbHZlKDM2KQogICAgICogXSk7CiAgICAgKgogICAgICogbnVtYmVycy50aGVuKF8uc3ByZWFkKGZ1bmN0aW9uKHgsIHkpIHsKICAgICAqICAgcmV0dXJuIHggKyB5OwogICAgICogfSkpOwogICAgICogLy8gPT4gYSBQcm9taXNlIG9mIDc2CiAgICAgKi8KICAgIGZ1bmN0aW9uIHNwcmVhZChmdW5jLCBzdGFydCkgewogICAgICBpZiAodHlwZW9mIGZ1bmMgIT0gJ2Z1bmN0aW9uJykgewogICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRlVOQ19FUlJPUl9URVhUKTsKICAgICAgfQogICAgICBzdGFydCA9IHN0YXJ0ID09IG51bGwgPyAwIDogbmF0aXZlTWF4KHRvSW50ZWdlcihzdGFydCksIDApOwogICAgICByZXR1cm4gYmFzZVJlc3QoZnVuY3Rpb24oYXJncykgewogICAgICAgIHZhciBhcnJheSA9IGFyZ3Nbc3RhcnRdLAogICAgICAgICAgICBvdGh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AgICAqIC8vID0+ICc8cD5mcmVkLCBiYXJuZXksICZhbXA7IHBlYmJsZXM8L3A+JwogICAgICovCiAgICBmdW5jdGlvbiB3cmFwKHZhbHVlLCB3cmFwcGVyKSB7CiAgICAgIHJldHVybiBwYXJ0aWFsKGNhc3RGdW5jdGlvbih3cmFwcGVyKSwgdmFsdWUpOwogICAgfQoKICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KCiAgICAvKioKICAgICAqIENhc3RzIGB2YWx1ZWAgYXMgYW4gYXJyYXkgaWYgaXQncyBub3Qgb25lLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC40LjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBpbnNwZWN0LgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBjYXN0IGFycmF5LgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfLmNhc3RBcnJheSgxKTsKICAgICAqIC8vID0+IFsxXQogICAgICoKICAgICAqIF8uY2FzdEFycmF5KHsgJ2EnOiAxIH0pOwogICAgICogLy8gPT4gW3sgJ2EnOiAxIH1dCiAgICAgKgogICAgICogXy5jYXN0QXJyYXkoJ2FiYycpOwogICAgICogLy8gPT4gWydhYmMnXQogICAgICoKICAgICAqIF8uY2FzdEFycmF5KG51bGwpOwogICAgICogLy8gPT4gW251bGxdCiAgICAgKgogICAgICogXy5jYXN0QXJyYXkodW5kZWZpbmVkKTsKICAgICAqIC8vID0+IFt1bmRlZmluZWRdCiAgICAgKgogICAgICogXy5jYXN0QXJyYXkoKTsKICAgICAqIC8vID0+IFtdCiAgICAgKgogICAgICogdmFyIGFycmF5ID0gWzEsIDIsIDNdOwogIC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MYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGFuIGFycmF5LWxpa2Ugb2JqZWN0LAogICAgICogIGVsc2UgYGZhbHNlYC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5pc0FycmF5TGlrZU9iamVjdChbMSwgMiwgM10pOwogICAgICogLy8gPT4gdHJ1ZQogICAgICoKICAgICAqIF8uaXNBcnJheUxpa2VPYmplY3QoZG9jdW1lbnQuYm9keS5jaGlsZHJlbik7CiAgICAgKiAvLyA9PiB0cnVlCiAgICAgKgogICAgICogXy5pc0FycmF5TGlrZU9iamVjdCgnYWJjJyk7CiAgICAgKiAvLyA9PiBmYWxzZQogICAgICoKICAgICAqIF8uaXNBcnJheUxpa2VPYmplY3QoXy5ub29wKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzQXJyYXlMaWtlT2JqZWN0KHZhbHVlKSB7CiAgICAgIHJldHVybiBpc09iamVjdExpa2UodmFsdWUpICYmIGlzQXJyYXlMaWtlKHZhbHVlKTsKICAgIH0KCiAgICAvKioKICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYSBib29sZWFuIHByaW1pdGl2ZSBvciBvYmplY3QuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IExhbmcKICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBib29sZWFuLCBlbHNlIGBmYWxzZWAuCiAgICAgKiBAZXhhbXBsZQogICAgICo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ogICAgICogXy5pc0VtcHR5KDEpOwogICAgICogLy8gPT4gdHJ1ZQogICAgICoKICAgICAqIF8uaXNFbXB0eShbMSwgMiwgM10pOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqCiAgICAgKiBfLmlzRW1wdHkoeyAnYSc6IDEgfSk7CiAgICAgKiAvLyA9PiBmYWxzZQogICAgICovCiAgICBmdW5jdGlvbiBpc0VtcHR5KHZhbHVlKSB7CiAgICAgIGlmICh2YWx1ZSA9PSBudWxsKSB7CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgIH0KICAgICAgaWYgKGlzQXJyYXlMaWtlKHZhbHVlKSAmJgogICAgICAgICAgKGlzQXJyYXkodmFsdWUpIHx8IHR5cGVvZiB2YWx1ZSA9PSAnc3RyaW5nJyB8fCB0eXBlb2YgdmFsdWUuc3BsaWNlID09ICdmdW5jdGlvbicgfHwKICAgICAgICAgICAgaXNCdWZmZXIodmFsdWUpIHx8IGlzVHlwZWRBcnJheSh2YWx1ZSkgfHwgaXNBcmd1bWVudHModmFsdWUpKSkgewogICAgICAgIHJldHVybiAhdmFsdWUubGVuZ3RoOwogICAgICB9CiAgICAgIHZhciB0YWcgPSBnZXRUYWcodmFsdWUpOwogICAgICBpZiAodGFnID09IG1hcFRhZyB8fCB0YWcgPT0gc2V0VGFnKSB7CiAgICAgICAgcmV0dXJuICF2YWx1ZS5zaXplOwogICAgICB9CiAgICAgIGlmIChpc1Byb3RvdHlwZSh2YWx1ZSkpIHsKICAgICAgICByZXR1cm4gIWJhc2VLZXlzKHZhbHVlKS5sZW5ndGg7CiAgICAgIH0KICAgICAgZm9yICh2YXIga2V5IGluIHZhbHVlKSB7CiAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwodmFsdWUsIGtleSkpIHsKICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHRydWU7CiAgICB9CgogICAgLyoqCiAgICAgKiBQZXJmb3JtcyBhIG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2JqZWN0TGlrZShbMSwgMiwgM10pOwogICAgICogLy8gPT4gdHJ1ZQogICAgICoKICAgICAqIF8uaXNPYmplY3RMaWtlKF8ubm9vcCk7CiAgICAgKiAvLyA9PiBmYWxzZQogICAgICoKICAgICAqIF8uaXNPYmplY3RMaWtlKG51bGwpOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqLwogICAgZnVuY3Rpb24gaXNPYmplY3RMaWtlKHZhbHVlKSB7CiAgICAgIHJldHVybiB2YWx1ZSAhPSBudWxsICYmIHR5cGVvZiB2YWx1ZSA9PSAnb2JqZWN0JzsKICAgIH0KCiAgICAvKioKICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGNsYXNzaWZpZWQgYXMgYSBgTWFwYCBvYmplY3QuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSA0LjMuMAogICAgICogQGNhdGVnb3J5IExhbmcKICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYSBtYXAsIGVsc2UgYGZhbHNlYC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5pc01hcChuZXcgTWFwKTsKICAgICAqIC8vID0+IHRydWUKICAgICAqCiAgICAgKiBfLmlzTWFwKG5ldyBXZWFrTWFwKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKi8KICAgIHZhciBpc01hcCA9IG5vZGVJc01hcCA/IGJhc2VVbmFyeShub2RlSXNNYXApIDogYmFzZUlzTWFwOwoKICAgIC8qKgogICAgICogUGVyZm9ybXMgYSBwYXJ0aWFsIGRlZXAgY29tcGFyaXNvbiBiZXR3ZWVuIGBvYmplY3RgIGFuZCBgc291cmNlYCB0bwogICAgICogZGV0ZXJtaW5lIGlmIGBvYmplY3RgIGNvbnRhaW5zIGVxdWl2Y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ICAgICAqCiAgICAgKiBfLmlzTmF0aXZlKF8pOwogICAgICogLy8gPT4gZmFsc2UKICAgICAqLwogICAgZnVuY3Rpb24gaXNOYXRpdmUodmFsdWUpIHsKICAgICAgaWYgKGlzTWFza2FibGUodmFsdWUpKSB7CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKENPUkVfRVJST1JfVEVYVCk7CiAgICAgIH0KICAgICAgcmV0dXJuIGJhc2VJc05hdGl2ZSh2YWx1ZSk7CiAgICB9CgogICAgLyoqCiAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBgbnVsbGAuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQGNhdGVnb3J5IExhbmcKICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIGNoZWNrLgogICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgYG51bGxgLCBlbHNlIGBmYWxzZWAuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8uaXNOdWxsKG51bGwpOwogICAgICogLy8gPT4gdHJ1ZQogICAgICoKICAgICAqIF8uaXNOdWxsKHZvaWQgMCk7CiAgICAgKiAvLyA9PiBmYWxzZQogICAgICovCiAgICBmdW5jdGlvbiBpc051bGwodmFsdWUpIHsKICAgICAgcmV0dXJuIHZhbHVlID09PSBudWxsOwogICAgfQoKICAgIC8qKgogICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMgYG51bGxgIG9yIGB1bmRlZmluZWRgLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay4KICAgICAqIEByZXR1cm5zIHtib29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FJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaXMgbGVzcyB0aGFuIGBvdGhlcmAsCiAgICAgKiAgZWxzZSBgZmFsc2VgLgogICAgICogQHNlZSBfLmd0CiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8ubHQoMSwgMyk7CiAgICAgKiAvLyA9PiB0cnVlCiAgICAgKgogICAgICogXy5sdCgzLCAzKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKgogICAgICogXy5sdCgzLCAxKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKi8KICAgIHZhciBsdCA9IGNyZWF0ZVJlbGF0aW9uYWxPcGVyYXRpb24oYmFzZUx0KTsKCiAgICAvKioKICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGxlc3MgdGhhbiBvciBlcXVhbCB0byBgb3RoZXJgLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgMy45LjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb21wYXJlLgogICAgICogQHBhcmFtIHsqfSBvdGhlciBUaGUgb3RoZXIgdmFsdWUgdG8gY29tcGFyZS4KICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdmFsdWVgIGlzIGxlc3MgdGhhbiBvciBlcXVhbCB0bwogICAgICogIGBvdGhlcmAsIGVsc2UgYGZhbHNlYC4KICAgICAqIEBzZWUgXy5ndGUKICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5sdGUoMSwgMyk7CiAgICAgKiAvLyA9PiB0cnVlCiAgICAgKgogICAgICogXy5sdGUoMywgMyk7CiAgICAgKiAvLyA9PiB0cnVlCiAgICAgKgogICAgICogXy5sdGUoMywgMSk7CiAgICAgKiAvLyA9PiBmYWxzZQogICAgICovCiAgICB2YXIgbHRlID0gY3JlYXRlUmVsYXRpb25hbE9wZXJhdGlvbihmdW5jdGlvbih2YWx1ZSwgb3RoZXIpIHsKICAgICAgcmV0dXJuIHZhbHVlIDw9IG90aGVyOwogICAgfSk7CgogICAgLyoqCiAgICAgKiBDb252ZXJ0cyBgdmFsdWVgIHRvIGFuIGFycmF5LgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBzaW5jZSAwLjEuMAogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBjb252ZXJ0ZWQgYXJyYXkuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8udG9BcnJheSh7ICdhJzogMSwgJ2InOiAyIH0pOwogICAgICogLy8gPT4gWzEsIDJdCiAgICAgKgogICAgICogXy50b0FycmF5KCdhYmMnKTsKICAgICAqIC8vID0+IFsnYScsICdiJywgJ2MnXQogICAgICoKICAgICAqIF8udG9BcnJheSgxKTsKICAgICAqIC8vID0+IFtdCiAgICAgKgogICAgICogXy50b0FycmF5KG51bGwpOwogICAgICogLy8gPT4gW10KICAgICAqLwogICAgZnVuY3Rpb24gdG9BcnJheSh2YWx1ZSkgewogICAgICBpZiAoIXZhbHVlKSB7CiAgICAgICAgcmV0dXJuIFtdOwogICAgICB9CiAgICAgIGlmIChpc0FycmF5TGlrZSh2YWx1ZSkpIHsKICAgICAgICByZXR1cm4gaXNTdHJpbmcodmFsdWUpID8gc3RyaW5nVG9BcnJheSh2YWx1ZSkgOiBjb3B5QXJyYXkodmFsdWUpOwogICAgICB9CiAgICAgIGlmIChzeW1JdGVyYXRvciAmJiB2YWx1ZVtzeW1JdGVyYXRvcl0pIHsKICAgICAgICByZXR1cm4gaXRlcmF0b3JUb0FycmF5KHZhbHVlW3N5bUl0ZXJhdG9yXSgpKTsKICAgICAgfQog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ZhciBzaWduID0gKHZhbHVlIDwgMCA/IC0xIDogMSk7CiAgICAgICAgcmV0dXJuIHNpZ24gKiBNQVhfSU5URUdFUjsKICAgICAgfQogICAgICByZXR1cm4gdmFsdWUgPT09IHZhbHVlID8gdmFsdWUgOiAwOwogICAgfQoKICAgIC8qKgogICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhbiBpbnRlZ2VyLgogICAgICoKICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBpcyBsb29zZWx5IGJhc2VkIG9uCiAgICAgKiBbYFRvSW50ZWdlcmBdKGh0dHA6Ly93d3cuZWNtYS1pbnRlcm5hdGlvbmFsLm9yZy9lY21hLTI2Mi83LjAvI3NlYy10b2ludGVnZXIpLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIGludGVnZXIuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8udG9JbnRlZ2VyKDMuMik7CiAgICAgKiAvLyA9PiAzCiAgICAgKgogICAgICogXy50b0ludGVnZXIoTnVtYmVyLk1JTl9WQUxVRSk7CiAgICAgKiAvLyA9PiAwCiAgICAgKgogICAgICogXy50b0ludGVnZXIoSW5maW5pdHkpOwogICAgICogLy8gPT4gMS43OTc2OTMxMzQ4NjIzMTU3ZSszMDgKICAgICAqCiAgICAgKiBfLnRvSW50ZWdlcignMy4yJyk7CiAgICAgKiAvLyA9PiAzCiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvSW50ZWdlcih2YWx1ZSkgewogICAgICB2YXIgcmVzdWx0ID0gdG9GaW5pdGUodmFsdWUpLAogICAgICAgICAgcmVtYWluZGVyID0gcmVzdWx0ICUg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lJBWV9MRU5HVEgpIDogMDsKICAgIH0KCiAgICAvKioKICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYSBudW1iZXIuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSA0LjAuMAogICAgICogQGNhdGVnb3J5IExhbmcKICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHByb2Nlc3MuCiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBudW1iZXIuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8udG9OdW1iZXIoMy4yKTsKICAgICAqIC8vID0+IDMuMgogICAgICoKICAgICAqIF8udG9OdW1iZXIoTnVtYmVyLk1JTl9WQUxVRSk7CiAgICAgKiAvLyA9PiA1ZS0zMjQKICAgICAqCiAgICAgKiBfLnRvTnVtYmVyKEluZmluaXR5KTsKICAgICAqIC8vID0+IEluZmluaXR5CiAgICAgKgogICAgICogXy50b051bWJlcignMy4yJyk7CiAgICAgKiAvLyA9PiAzLjIKICAgICAqLwogICAgZnVuY3Rpb24gdG9OdW1iZXIodmFsdWUpIHsKICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PSAnbnVtYmVyJykgewogICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgfQogICAgICBpZiAoaXNTeW1ib2wodmFsdWUpKSB7CiAgICAgICAgcmV0dXJuIE5BTjsKICAgICAgfQogICAgICBpZiAoaXNPYmplY3QodmFsdWUpKSB7CiAgICAgICAgdmFyIG90aGVyID0gdHlwZW9mIHZhbHVlLnZhbHVlT2YgPT0gJ2Z1bmN0aW9uJyA/IHZhbHVlLnZhbHVlT2YoKSA6IHZhbHVlOwogICAgICAgIHZhbHVlID0gaXNPYmplY3Qob3RoZXIpID8gKG90aGVyICsgJycpIDogb3RoZXI7CiAgICAgIH0KICAgICAgaWYgKHR5cGVvZiB2YWx1ZSAhPSAnc3R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PT4geyAnYSc6IDEsICdiJzogMiB9CiAgICAgKgogICAgICogXy5hc3NpZ24oeyAnYSc6IDEgfSwgXy50b1BsYWluT2JqZWN0KG5ldyBGb28pKTsKICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYic6IDIsICdjJzogMyB9CiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvUGxhaW5PYmplY3QodmFsdWUpIHsKICAgICAgcmV0dXJuIGNvcHlPYmplY3QodmFsdWUsIGtleXNJbih2YWx1ZSkpOwogICAgfQoKICAgIC8qKgogICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIHNhZmUgaW50ZWdlci4gQSBzYWZlIGludGVnZXIgY2FuIGJlIGNvbXBhcmVkIGFuZAogICAgICogcmVwcmVzZW50ZWQgY29ycmVjdGx5LgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBMYW5nCiAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LgogICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIGludGVnZXIuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8udG9TYWZlSW50ZWdlcigzLjIpOwogICAgICogLy8gPT4gMwogICAgICoKICAgICAqIF8udG9TYWZlSW50ZWdlcihOdW1iZXIuTUlOX1ZBTFVFKTsKICAgICAqIC8vID0+IDAKICAgICAqCiAgICAgKiBfLnRvU2FmZUludGVnZXIoSW5maW5pdHkpOwogICAgICogLy8gPT4gOTAwNzE5OTI1NDc0MDk5MQogICAgICoKICAgICAqIF8udG9TYWZlSW50ZWdlcignMy4yJyk7CiAgICAgKiAvLyA9PiAzCiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvU2FmZUludGVnZXIodmFsdWUpIHsKICAgICAgcmV0dXJuIHZhbHVlCiAgICAgICAgPyBiYXNlQ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ZWN0cy4KICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCiAgICAgKiBAc2VlIF8uZGVmYXVsdHNEZWVwCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8uZGVmYXVsdHMoeyAnYSc6IDEgfSwgeyAnYic6IDIgfSwgeyAnYSc6IDMgfSk7CiAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2InOiAyIH0KICAgICAqLwogICAgdmFyIGRlZmF1bHRzID0gYmFzZVJlc3QoZnVuY3Rpb24ob2JqZWN0LCBzb3VyY2VzKSB7CiAgICAgIG9iamVjdCA9IE9iamVjdChvYmplY3QpOwoKICAgICAgdmFyIGluZGV4ID0gLTE7CiAgICAgIHZhciBsZW5ndGggPSBzb3VyY2VzLmxlbmd0aDsKICAgICAgdmFyIGd1YXJkID0gbGVuZ3RoID4gMiA/IHNvdXJjZXNbMl0gOiB1bmRlZmluZWQ7CgogICAgICBpZiAoZ3VhcmQgJiYgaXNJdGVyYXRlZUNhbGwoc291cmNlc1swXSwgc291cmNlc1sxXSwgZ3VhcmQpKSB7CiAgICAgICAgbGVuZ3RoID0gMTsKICAgICAgfQoKICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKICAgICAgICB2YXIgc291cmNlID0gc291cmNlc1tpbmRleF07CiAgICAgICAgdmFyIHByb3BzID0ga2V5c0luKHNvdXJjZSk7CiAgICAgICAgdmFyIHByb3BzSW5kZXggPSAtMTsKICAgICAgICB2YXIgcHJvcHNMZW5ndGggPSBwcm9wcy5sZW5ndGg7CgogICAgICAgIHdoaWxlICgrK3Byb3BzSW5kZXggPCBwcm9wc0xlbmd0aCkgewogICAgICAgICAgdmFyIGtleSA9IHByb3BzW3Byb3BzSW5kZXhdOwogICAgICAgICAgdmFyIHZhbHVlID0gb2JqZWN0W2tleV07CgogICAgICAgICAgaWYgKHZhbHVlID09PSB1bmRlZmluZWQgfHwKICAgICAgICAgICAgICAoZXEodmFsd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LmNyZWF0ZSh7ICdiJzogMiB9KSB9KTsKICAgICAqCiAgICAgKiBfLmhhc0luKG9iamVjdCwgJ2EnKTsKICAgICAqIC8vID0+IHRydWUKICAgICAqCiAgICAgKiBfLmhhc0luKG9iamVjdCwgJ2EuYicpOwogICAgICogLy8gPT4gdHJ1ZQogICAgICoKICAgICAqIF8uaGFzSW4ob2JqZWN0LCBbJ2EnLCAnYiddKTsKICAgICAqIC8vID0+IHRydWUKICAgICAqCiAgICAgKiBfLmhhc0luKG9iamVjdCwgJ2InKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKi8KICAgIGZ1bmN0aW9uIGhhc0luKG9iamVjdCwgcGF0aCkgewogICAgICByZXR1cm4gb2JqZWN0ICE9IG51bGwgJiYgaGFzUGF0aChvYmplY3QsIHBhdGgsIGJhc2VIYXNJbik7CiAgICB9CgogICAgLyoqCiAgICAgKiBDcmVhdGVzIGFuIG9iamVjdCBjb21wb3NlZCBvZiB0aGUgaW52ZXJ0ZWQga2V5cyBhbmQgdmFsdWVzIG9mIGBvYmplY3RgLgogICAgICogSWYgYG9iamVjdGAgY29udGFpbnMgZHVwbGljYXRlIHZhbHVlcywgc3Vic2VxdWVudCB2YWx1ZXMgb3ZlcndyaXRlCiAgICAgKiBwcm9wZXJ0eSBhc3NpZ25tZW50cyBvZiBwcmV2aW91cyB2YWx1ZXMuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAwLjcuMAogICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGludmVydC4KICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBpbnZlcnRlZCBvYmplY3QuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSwgJ2InOiAyLCAnYyc6IDEgfTsKICAgICAq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0YXRpYwogICAgICogQHNpbmNlIDAuMS4wCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIHF1ZXJ5LgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiBwcm9wZXJ0eSBuYW1lcy4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogZnVuY3Rpb24gRm9vKCkgewogICAgICogICB0aGlzLmEgPSAxOwogICAgICogICB0aGlzLmIgPSAyOwogICAgICogfQogICAgICoKICAgICAqIEZvby5wcm90b3R5cGUuYyA9IDM7CiAgICAgKgogICAgICogXy5rZXlzKG5ldyBGb28pOwogICAgICogLy8gPT4gWydhJywgJ2InXSAoaXRlcmF0aW9uIG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkKQogICAgICoKICAgICAqIF8ua2V5cygnaGknKTsKICAgICAqIC8vID0+IFsnMCcsICcxJ10KICAgICAqLwogICAgZnVuY3Rpb24ga2V5cyhvYmplY3QpIHsKICAgICAgcmV0dXJuIGlzQXJyYXlMaWtlKG9iamVjdCkgPyBhcnJheUxpa2VLZXlzKG9iamVjdCkgOiBiYXNlS2V5cyhvYmplY3QpOwogICAgfQoKICAgIC8qKgogICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB0aGUgb3duIGFuZCBpbmhlcml0ZWQgZW51bWVyYWJsZSBwcm9wZXJ0eSBuYW1lcyBvZiBgb2JqZWN0YC4KICAgICAqCiAgICAgKiAqKk5vdGU6KiogTm9uLW9iamVjdCB2YWx1ZXMgYXJlIGNvZXJjZWQgdG8gb2JqZWN0cy4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDMuMC4wCiAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0CiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZW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AgICAqCiAgICAgKiB2YXIgb2JqZWN0ID0geyAnYSc6IDEsICdiJzogJzInLCAnYyc6IDMgfTsKICAgICAqCiAgICAgKiBfLm9taXQob2JqZWN0LCBbJ2EnLCAnYyddKTsKICAgICAqIC8vID0+IHsgJ2InOiAnMicgfQogICAgICovCiAgICB2YXIgb21pdCA9IGZsYXRSZXN0KGZ1bmN0aW9uKG9iamVjdCwgcGF0aHMpIHsKICAgICAgdmFyIHJlc3VsdCA9IHt9OwogICAgICBpZiAob2JqZWN0ID09IG51bGwpIHsKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9CiAgICAgIHZhciBpc0RlZXAgPSBmYWxzZTsKICAgICAgcGF0aHMgPSBhcnJheU1hcChwYXRocywgZnVuY3Rpb24ocGF0aCkgewogICAgICAgIHBhdGggPSBjYXN0UGF0aChwYXRoLCBvYmplY3QpOwogICAgICAgIGlzRGVlcCB8fCAoaXNEZWVwID0gcGF0aC5sZW5ndGggPiAxKTsKICAgICAgICByZXR1cm4gcGF0aDsKICAgICAgfSk7CiAgICAgIGNvcHlPYmplY3Qob2JqZWN0LCBnZXRBbGxLZXlzSW4ob2JqZWN0KSwgcmVzdWx0KTsKICAgICAgaWYgKGlzRGVlcCkgewogICAgICAgIHJlc3VsdCA9IGJhc2VDbG9uZShyZXN1bHQsIENMT05FX0RFRVBfRkxBRyB8IENMT05FX0ZMQVRfRkxBRyB8IENMT05FX1NZTUJPTFNfRkxBRywgY3VzdG9tT21pdENsb25lKTsKICAgICAgfQogICAgICB2YXIgbGVuZ3RoID0gcGF0aHMubGVuZ3RoOwogICAgICB3aGlsZSAobGVuZ3RoLS0pIHsKICAgICAgICBiYXNlVW5zZXQocmVzdWx0LCBwYXRoc1tsZW5ndGhdKTsKICAgICAgfQogICAgICByZXR1cm4gcmVzdWx0OwogICAgfSk7CgogICAgLyoqCiAgICAgKiBUaGUgb3Bwb3NpdGUgb2YgYF8ucGlja0J5YDsgdGhpcyBtZXRob2QgY3JlYXRlcyBhbiBvYmplY3QgY29tcG9zZWQgb2YKICAgICAqIHRoZSBvd24gYW5kIGluaGVyaXRlZCBlbnVtZXJhYmxlIHN0cmluZyBrZXllZCBwcm9wZXJ0aWVzIG9mIGBvYmplY3RgIHRoYXQKICAgICAqIGBwcmVkaWNhdGVgIGRvZXNuJ3QgcmV0dXJuIHRydXRoeSBmb3IuIFRoZSBwcmVkaWNhdGUgaXMgaW52b2tlZCB3aXRoIHR3bwogICAgICogYXJndW1lbnRzOiAodmFsdWUsIGtleSkuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSA0LjAuMAogICAgICogQGNhdGVnb3J5IE9iamVjdAogICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgc291cmNlIG9iamVjdC4KICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtwcmVkaWNhdGU9Xy5pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGludm9rZWQgcGVyIHByb3BlcnR5LgogICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IG9iamVjdC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogdmFyIG9iamVjdCA9IHsgJ2EnOiAxLCAnYic6ICcyJywgJ2MnOiAzIH07CiAgICAgKgogICAgICogXy5vbWl0Qnkob2JqZWN0LCBfLmlzTnVtYmVyKTsKICAgICAqIC8vID0+IHsgJ2InOiAnMicgfQogICAgICovCiAgICBmdW5jdGlvbiBvbWl0Qnkob2JqZWN0LCBwcmVkaWNhdGUpIHsKICAgICAgcmV0dXJuIHBpY2tCeShvYmplY3QsIG5lZ2F0ZShnZXRJdGVyYXRlZShwcmVkaWNhdGUpKSk7CiAgICB9CgogICAgLyoqCiAgICAgKiBDcmVhdGVzIGFuIG9iamVjdCBjb21wb3NlZCBvZiB0aGUgcGlja2VkIGBvYmplY3RgIHByb3BlcnRpZXMuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICog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RlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBwcm9wZXJ0eS4KICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBvYmplY3QuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBvYmplY3QgPSB7ICdhJzogMSwgJ2InOiAnMicsICdjJzogMyB9OwogICAgICoKICAgICAqIF8ucGlja0J5KG9iamVjdCwgXy5pc051bWJlcik7CiAgICAgKiAvLyA9PiB7ICdhJzogMSwgJ2MnOiAzIH0KICAgICAqLwogICAgZnVuY3Rpb24gcGlja0J5KG9iamVjdCwgcHJlZGljYXRlKSB7CiAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkgewogICAgICAgIHJldHVybiB7fTsKICAgICAgfQogICAgICB2YXIgcHJvcHMgPSBhcnJheU1hcChnZXRBbGxLZXlzSW4ob2JqZWN0KSwgZnVuY3Rpb24ocHJvcCkgewogICAgICAgIHJldHVybiBbcHJvcF07CiAgICAgIH0pOwogICAgICBwcmVkaWNhdGUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUpOwogICAgICByZXR1cm4gYmFzZVBpY2tCeShvYmplY3QsIHByb3BzLCBmdW5jdGlvbih2YWx1ZSwgcGF0aCkgewogICAgICAgIHJldHVybiBwcmVkaWNhdGUodmFsdWUsIHBhdGhbMF0pOwogICAgICB9KTsKICAgIH0KCiAgICAvKioKICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZ2V0YCBleGNlcHQgdGhhdCBpZiB0aGUgcmVzb2x2ZWQgdmFsdWUgaXMgYQogICAgICogZnVuY3Rpb24gaXQncyBpbnZva2VkIHdpdGggdGhlIGB0aGlzYCBiaW5kaW5nIG9mIGl0cyBwYXJlbnQgb2JqZWN0IGFuZAogICAgICogaXRzIHJlc3VsdCBpcyByZXR1cm5lZC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAc2luY2UgMC4xLjAK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5wdXNoKG4gKj0gbik7CiAgICAgKiAgIHJldHVybiBuICUgMiA9PSAwOwogICAgICogfSwgW10pOwogICAgICogLy8gPT4gWzQsIDldCiAgICAgKgogICAgICogXy50cmFuc2Zvcm0oeyAnYSc6IDEsICdiJzogMiwgJ2MnOiAxIH0sIGZ1bmN0aW9uKHJlc3VsdCwgdmFsdWUsIGtleSkgewogICAgICogICAocmVzdWx0W3ZhbHVlXSB8fCAocmVzdWx0W3ZhbHVlXSA9IFtdKSkucHVzaChrZXkpOwogICAgICogfSwge30pOwogICAgICogLy8gPT4geyAnMSc6IFsnYScsICdjJ10sICcyJzogWydiJ10gfQogICAgICovCiAgICBmdW5jdGlvbiB0cmFuc2Zvcm0ob2JqZWN0LCBpdGVyYXRlZSwgYWNjdW11bGF0b3IpIHsKICAgICAgdmFyIGlzQXJyID0gaXNBcnJheShvYmplY3QpLAogICAgICAgICAgaXNBcnJMaWtlID0gaXNBcnIgfHwgaXNCdWZmZXIob2JqZWN0KSB8fCBpc1R5cGVkQXJyYXkob2JqZWN0KTsKCiAgICAgIGl0ZXJhdGVlID0gZ2V0SXRlcmF0ZWUoaXRlcmF0ZWUsIDQpOwogICAgICBpZiAoYWNjdW11bGF0b3IgPT0gbnVsbCkgewogICAgICAgIHZhciBDdG9yID0gb2JqZWN0ICYmIG9iamVjdC5jb25zdHJ1Y3RvcjsKICAgICAgICBpZiAoaXNBcnJMaWtlKSB7CiAgICAgICAgICBhY2N1bXVsYXRvciA9IGlzQXJyID8gbmV3IEN0b3IgOiBbXTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoaXNPYmplY3Qob2JqZWN0KSkgewogICAgICAgICAgYWNjdW11bGF0b3IgPSBpc0Z1bmN0aW9uKEN0b3IpID8gYmFzZUNyZWF0ZShnZXRQcm90b3R5cGUob2JqZWN0KSkgOiB7fTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICBhY2N1bXVsYXRvciA9IHt9OwogICAgICAgIH0KICAg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ZWdvcnkgTnVtYmVyCiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gY2xhbXAuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gW2xvd2VyXSBUaGUgbG93ZXIgYm91bmQuCiAgICAgKiBAcGFyYW0ge251bWJlcn0gdXBwZXIgVGhlIHVwcGVyIGJvdW5kLgogICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY2xhbXBlZCBudW1iZXIuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8uY2xhbXAoLTEwLCAtNSwgNSk7CiAgICAgKiAvLyA9PiAtNQogICAgICoKICAgICAqIF8uY2xhbXAoMTAsIC01LCA1KTsKICAgICAqIC8vID0+IDUKICAgICAqLwogICAgZnVuY3Rpb24gY2xhbXAobnVtYmVyLCBsb3dlciwgdXBwZXIpIHsKICAgICAgaWYgKHVwcGVyID09PSB1bmRlZmluZWQpIHsKICAgICAgICB1cHBlciA9IGxvd2VyOwogICAgICAgIGxvd2VyID0gdW5kZWZpbmVkOwogICAgICB9CiAgICAgIGlmICh1cHBlciAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgdXBwZXIgPSB0b051bWJlcih1cHBlcik7CiAgICAgICAgdXBwZXIgPSB1cHBlciA9PT0gdXBwZXIgPyB1cHBlciA6IDA7CiAgICAgIH0KICAgICAgaWYgKGxvd2VyICE9PSB1bmRlZmluZWQpIHsKICAgICAgICBsb3dlciA9IHRvTnVtYmVyKGxvd2VyKTsKICAgICAgICBsb3dlciA9IGxvd2VyID09PSBsb3dlciA/IGxvd2VyIDogMDsKICAgICAgfQogICAgICByZXR1cm4gYmFzZUNsYW1wKHRvTnVtYmVyKG51bWJlciksIGxvd2VyLCB1cHBlcik7CiAgICB9CgogICAgLyoqCiAgICAgKiBDaGVja3MgaWYgYG5gIGlzIGJldHdlZW4gYHN0YXJ0YCBhbmQgdXAgdG8sIGJ1dCBub3QgaW5jbHVkaW5n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ICAgICB1cHBlciA9IGZsb2F0aW5nID0gdW5kZWZpbmVkOwogICAgICB9CiAgICAgIGlmIChmbG9hdGluZyA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgaWYgKHR5cGVvZiB1cHBlciA9PSAnYm9vbGVhbicpIHsKICAgICAgICAgIGZsb2F0aW5nID0gdXBwZXI7CiAgICAgICAgICB1cHBlciA9IHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAodHlwZW9mIGxvd2VyID09ICdib29sZWFuJykgewogICAgICAgICAgZmxvYXRpbmcgPSBsb3dlcjsKICAgICAgICAgIGxvd2VyID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgfQogICAgICBpZiAobG93ZXIgPT09IHVuZGVmaW5lZCAmJiB1cHBlciA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgbG93ZXIgPSAwOwogICAgICAgIHVwcGVyID0gMTsKICAgICAgfQogICAgICBlbHNlIHsKICAgICAgICBsb3dlciA9IHRvRmluaXRlKGxvd2VyKTsKICAgICAgICBpZiAodXBwZXIgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgdXBwZXIgPSBsb3dlcjsKICAgICAgICAgIGxvd2VyID0gMDsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgdXBwZXIgPSB0b0Zpbml0ZSh1cHBlcik7CiAgICAgICAgfQogICAgICB9CiAgICAgIGlmIChsb3dlciA+IHVwcGVyKSB7CiAgICAgICAgdmFyIHRlbXAgPSBsb3dlcjsKICAgICAgICBsb3dlciA9IHVwcGVyOwogICAgICAgIHVwcGVyID0gdGVtcDsKICAgICAgfQogICAgICBpZiAoZmxvYXRpbmcgfHwgbG93ZXIgJSAxIHx8IHVwcGVyICUgMSkgewogICAgICAgIHZhciByYW5kID0gbmF0aXZlUmFuZG9tKCk7CiAgICAgICAgcmV0dXJuIG5hdGl2ZU1pbihsb3dlciArIChyYW5kICogKHVwcGVyIC0gbG93ZXIgKyBmcmVlUGFyc2VGb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pYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSA0LjAuMAogICAgICogQGNhdGVnb3J5IFN0cmluZwogICAgICogQHBhcmFtIHtzdHJpbmd9IFtzdHJpbmc9JyddIFRoZSBzdHJpbmcgdG8gcGFkLgogICAgICogQHBhcmFtIHtudW1iZXJ9IFtsZW5ndGg9MF0gVGhlIHBhZGRpbmcgbGVuZ3RoLgogICAgICogQHBhcmFtIHtzdHJpbmd9IFtjaGFycz0nICddIFRoZSBzdHJpbmcgdXNlZCBhcyBwYWRkaW5nLgogICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgcGFkZGVkIHN0cmluZy4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5wYWRTdGFydCgnYWJjJywgNik7CiAgICAgKiAvLyA9PiAnICAgYWJjJwogICAgICoKICAgICAqIF8ucGFkU3RhcnQoJ2FiYycsIDYsICdfLScpOwogICAgICogLy8gPT4gJ18tX2FiYycKICAgICAqCiAgICAgKiBfLnBhZFN0YXJ0KCdhYmMnLCAzKTsKICAgICAqIC8vID0+ICdhYmMnCiAgICAgKi8KICAgIGZ1bmN0aW9uIHBhZFN0YXJ0KHN0cmluZywgbGVuZ3RoLCBjaGFycykgewogICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwogICAgICBsZW5ndGggPSB0b0ludGVnZXIobGVuZ3RoKTsKCiAgICAgIHZhciBzdHJMZW5ndGggPSBsZW5ndGggPyBzdHJpbmdTaXplKHN0cmluZykgOiAwOwogICAgICByZXR1cm4gKGxlbmd0aCAmJiBzdHJMZW5ndGggPCBsZW5ndGgpCiAgICAgICAgPyAoY3JlYXRlUGFkZGluZyhsZW5ndGggLSBzdHJMZW5ndGgsIGNoYXJzKSArIHN0cmluZykKICAgICAgICA6IHN0cmluZzsKICAgIH0KCiAgICAvKioKICAgICAqIENvbnZlcnRzIGBzdHJpbmdgIHRvIGFuIGludGVnZXIgb2YgdGhlIHNwZWNpZm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x8ICdvYmonKSArICcpIHtcbicgKwogICAgICAgICh2YXJpYWJsZQogICAgICAgICAgPyAnJwogICAgICAgICAgOiAnb2JqIHx8IChvYmogPSB7fSk7XG4nCiAgICAgICAgKSArCiAgICAgICAgInZhciBfX3QsIF9fcCA9ICcnIiArCiAgICAgICAgKGlzRXNjYXBpbmcKICAgICAgICAgICA/ICcsIF9fZSA9IF8uZXNjYXBlJwogICAgICAgICAgIDogJycKICAgICAgICApICsKICAgICAgICAoaXNFdmFsdWF0aW5nCiAgICAgICAgICA/ICcsIF9faiA9IEFycmF5LnByb3RvdHlwZS5qb2luO1xuJyArCiAgICAgICAgICAgICJmdW5jdGlvbiBwcmludCgpIHsgX19wICs9IF9fai5jYWxsKGFyZ3VtZW50cywgJycpIH1cbiIKICAgICAgICAgIDogJztcbicKICAgICAgICApICsKICAgICAgICBzb3VyY2UgKwogICAgICAgICdyZXR1cm4gX19wXG59JzsKCiAgICAgIHZhciByZXN1bHQgPSBhdHRlbXB0KGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBGdW5jdGlvbihpbXBvcnRzS2V5cywgc291cmNlVVJMICsgJ3JldHVybiAnICsgc291cmNlKQogICAgICAgICAgLmFwcGx5KHVuZGVmaW5lZCwgaW1wb3J0c1ZhbHVlcyk7CiAgICAgIH0pOwoKICAgICAgLy8gUHJvdmlkZSB0aGUgY29tcGlsZWQgZnVuY3Rpb24ncyBzb3VyY2UgYnkgaXRzIGB0b1N0cmluZ2AgbWV0aG9kIG9yCiAgICAgIC8vIHRoZSBgc291cmNlYCBwcm9wZXJ0eSBhcyBhIGNvbnZlbmllbmNlIGZvciBpbmxpbmluZyBjb21waWxlZCB0ZW1wbGF0ZXMuCiAgICAgIHJlc3VsdC5zb3VyY2UgPSBzb3VyY2U7CiAgICAgIGlmIChpc0Vycm9yKHJlc3VsdCkpIHsKICAgICAgICB0aHJvdyByZXN1bHQ7CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KCi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luZyB0byBpbmRpY2F0ZSB0ZXh0IGlzIG9taXR0ZWQuCiAgICAgKiBAcGFyYW0ge1JlZ0V4cHxzdHJpbmd9IFtvcHRpb25zLnNlcGFyYXRvcl0gVGhlIHNlcGFyYXRvciBwYXR0ZXJuIHRvIHRydW5jYXRlIHRvLgogICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgdHJ1bmNhdGVkIHN0cmluZy4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy50cnVuY2F0ZSgnaGktZGlkZGx5LWhvIHRoZXJlLCBuZWlnaGJvcmlubycpOwogICAgICogLy8gPT4gJ2hpLWRpZGRseS1obyB0aGVyZSwgbmVpZ2hiby4uLicKICAgICAqCiAgICAgKiBfLnRydW5jYXRlKCdoaS1kaWRkbHktaG8gdGhlcmUsIG5laWdoYm9yaW5vJywgewogICAgICogICAnbGVuZ3RoJzogMjQsCiAgICAgKiAgICdzZXBhcmF0b3InOiAnICcKICAgICAqIH0pOwogICAgICogLy8gPT4gJ2hpLWRpZGRseS1obyB0aGVyZSwuLi4nCiAgICAgKgogICAgICogXy50cnVuY2F0ZSgnaGktZGlkZGx5LWhvIHRoZXJlLCBuZWlnaGJvcmlubycsIHsKICAgICAqICAgJ2xlbmd0aCc6IDI0LAogICAgICogICAnc2VwYXJhdG9yJzogLyw/ICsvCiAgICAgKiB9KTsKICAgICAqIC8vID0+ICdoaS1kaWRkbHktaG8gdGhlcmUuLi4nCiAgICAgKgogICAgICogXy50cnVuY2F0ZSgnaGktZGlkZGx5LWhvIHRoZXJlLCBuZWlnaGJvcmlubycsIHsKICAgICAqICAgJ29taXNzaW9uJzogJyBbLi4uXScKICAgICAqIH0pOwogICAgICogLy8gPT4gJ2hpLWRpZGRseS1obyB0aGVyZSwgbmVpZyBbLi4uXScKICAgICAqLwogICAgZnVuY3Rpb24gdHJ1bmNhdGUoc3RyaW5nLCBvcHRpb25zKSB7CiAgICAgIHZhciBsZW5ndGggPSBERUZBVUxUX1RSVU5DX0xFTkdUSCwKICAgICAgICAgIG9taXNzaW9uID0gREVGQVVMVF9UUlVOQ19PTUlTU0lPTjsKCiAgICAgIGlmIChpc09iamVjdChvcHRpb25zKSkgewogICAgICAgIHZhciBzZXBhcmF0b3IgPSAnc2VwYXJhdG9yJyBpbiBvcHRpb25zID8gb3B0aW9ucy5zZXBhcmF0b3IgOiBzZXBhcmF0b3I7CiAgICAgICAgbGVuZ3RoID0gJ2xlbmd0aCcgaW4gb3B0aW9ucyA/IHRvSW50ZWdlcihvcHRpb25zLmxlbmd0aCkgOiBsZW5ndGg7CiAgICAgICAgb21pc3Npb24gPSAnb21pc3Npb24nIGluIG9wdGlvbnMgPyBiYXNlVG9TdHJpbmcob3B0aW9ucy5vbWlzc2lvbikgOiBvbWlzc2lvbjsKICAgICAgfQogICAgICBzdHJpbmcgPSB0b1N0cmluZyhzdHJpbmcpOwoKICAgICAgdmFyIHN0ckxlbmd0aCA9IHN0cmluZy5sZW5ndGg7CiAgICAgIGlmIChoYXNVbmljb2RlKHN0cmluZykpIHsKICAgICAgICB2YXIgc3RyU3ltYm9scyA9IHN0cmluZ1RvQXJyYXkoc3RyaW5nKTsKICAgICAgICBzdHJMZW5ndGggPSBzdHJTeW1ib2xzLmxlbmd0aDsKICAgICAgfQogICAgICBpZiAobGVuZ3RoID49IHN0ckxlbmd0aCkgewogICAgICAgIHJldHVybiBzdHJpbmc7CiAgICAgIH0KICAgICAgdmFyIGVuZCA9IGxlbmd0aCAtIHN0cmluZ1NpemUob21pc3Npb24pOwogICAgICBpZiAoZW5kIDwgMSkgewogICAgICAgIHJldHVybiBvbWlzc2lvbjsKICAgICAgfQogICAgICB2YXIgcmVzdWx0ID0gc3RyU3ltYm9scwogICAgICAgID8gY2FzdFNsaWNlKHN0clN5bWJvbHMsIDAsIGVuZCkuam9pbignJykKICAgICAgICA6IHN0cmluZy5zbGljZSgwLCBlbmQpOwoKICAgICAgaWYgKHNlcGFyYXRvciA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgcmV0dXJuIHJlc3VsdCArIG9taXNzaW9uOwogICAgICB9CiAgICAgIGlmIChzdHJTeW1ib2xzKSB7CiAgICAgICAgZW5kICs9IChyZXN1bHQubGVuZ3RoIC0gZW5kKTsKICAgICAgfQogICAgICBpZiAoaXNSZWdFeHAoc2VwYXJhdG9yKSkgewogICAgICAgIGlmIChzdHJpbmcuc2xpY2UoZW5kKS5zZWFyY2goc2VwYXJhdG9yKSkgewogICAgICAgICAgdmFyIG1hdGNoLAogICAgICAgICAgICAgIHN1YnN0cmluZyA9IHJlc3VsdDsKCiAgICAgICAgICBpZiAoIXNlcGFyYXRvci5nbG9iYWwpIHsKICAgICAgICAgICAgc2VwYXJhdG9yID0gUmVnRXhwKHNlcGFyYXRvci5zb3VyY2UsIHRvU3RyaW5nKHJlRmxhZ3MuZXhlYyhzZXBhcmF0b3IpKSArICdnJyk7CiAgICAgICAgICB9CiAgICAgICAgICBzZXBhcmF0b3IubGFzdEluZGV4ID0gMDsKICAgICAgICAgIHdoaWxlICgobWF0Y2ggPSBzZXBhcmF0b3IuZXhlYyhzdWJzdHJpbmcpKSkgewogICAgICAgICAgICB2YXIgbmV3RW5kID0gbWF0Y2guaW5kZXg7CiAgICAgICAgICB9CiAgICAgICAgICByZXN1bHQgPSByZXN1bHQuc2xpY2UoMCwgbmV3RW5kID09PSB1bmRlZmluZWQgPyBlbmQgOiBuZXdFbmQpOwogICAgICAgIH0KICAgICAgfSBlbHNlIGlmIChzdHJpbmcuaW5kZXhPZihiYXNlVG9TdHJpbmcoc2VwYXJhdG9yKSwgZW5kKSAhPSBlbmQpIHsKICAgICAgICB2YXIgaW5kZXggPSByZXN1bHQubGFzdEluZGV4T2Yoc2VwYXJhdG9yKTsKICAgICAgICBpZiAoaW5kZXggPiAtMSkgewogICAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnNsaWNlKDAsIGluZGV4KTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIHJlc3V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ym9vbGVhbn0gW29wdGlvbnMuY2hhaW49dHJ1ZV0gU3BlY2lmeSB3aGV0aGVyIG1peGlucyBhcmUgY2hhaW5hYmxlLgogICAgICogQHJldHVybnMge0Z1bmN0aW9ufE9iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogZnVuY3Rpb24gdm93ZWxzKHN0cmluZykgewogICAgICogICByZXR1cm4gXy5maWx0ZXIoc3RyaW5nLCBmdW5jdGlvbih2KSB7CiAgICAgKiAgICAgcmV0dXJuIC9bYWVpb3VdL2kudGVzdCh2KTsKICAgICAqICAgfSk7CiAgICAgKiB9CiAgICAgKgogICAgICogXy5taXhpbih7ICd2b3dlbHMnOiB2b3dlbHMgfSk7CiAgICAgKiBfLnZvd2VscygnZnJlZCcpOwogICAgICogLy8gPT4gWydlJ10KICAgICAqCiAgICAgKiBfKCdmcmVkJykudm93ZWxzKCkudmFsdWUoKTsKICAgICAqIC8vID0+IFsnZSddCiAgICAgKgogICAgICogXy5taXhpbih7ICd2b3dlbHMnOiB2b3dlbHMgfSwgeyAnY2hhaW4nOiBmYWxzZSB9KTsKICAgICAqIF8oJ2ZyZWQnKS52b3dlbHMoKTsKICAgICAqIC8vID0+IFsnZSddCiAgICAgKi8KICAgIGZ1bmN0aW9uIG1peGluKG9iamVjdCwgc291cmNlLCBvcHRpb25zKSB7CiAgICAgIHZhciBwcm9wcyA9IGtleXMoc291cmNlKSwKICAgICAgICAgIG1ldGhvZE5hbWVzID0gYmFzZUZ1bmN0aW9ucyhzb3VyY2UsIHByb3BzKTsKCiAgICAgIGlmIChvcHRpb25zID09IG51bGwgJiYKICAgICAgICAgICEoaXNPYmplY3Qoc291cmNlKSAmJiAobWV0aG9kTmFtZXMubGVuZ3RoIHx8ICFwcm9wcy5sZW5ndGgpKSkgewogICAgICAgIG9wdGlvbnMgPSBzb3VyY2U7CiAgICAgICAgc291cmNlID0gb2JqZWN0OwogICAgICAgIG9iamVjdCA9IHRoaXM7CiAgICAgICAgbWV0aG9kTmFtZXMgPSBiYXNlRnVuY3Rpb25zKHNvdXJjZSwga2V5cyhzb3VyY2UpKTsKICAgICAgfQogICAgICB2YXIgY2hhaW4gPSAhKGlzT2JqZWN0KG9wdGlvbnMpICYmICdjaGFpbicgaW4gb3B0aW9ucykgfHwgISFvcHRpb25zLmNoYWluLAogICAgICAgICAgaXNGdW5jID0gaXNGdW5jdGlvbihvYmplY3QpOwoKICAgICAgYXJyYXlFYWNoKG1ldGhvZE5hbWVzLCBmdW5jdGlvbihtZXRob2ROYW1lKSB7CiAgICAgICAgdmFyIGZ1bmMgPSBzb3VyY2VbbWV0aG9kTmFtZV07CiAgICAgICAgb2JqZWN0W21ldGhvZE5hbWVdID0gZnVuYzsKICAgICAgICBpZiAoaXNGdW5jKSB7CiAgICAgICAgICBvYmplY3QucHJvdG90eXBlW21ldGhvZE5hbWVdID0gZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHZhciBjaGFpbkFsbCA9IHRoaXMuX19jaGFpbl9fOwogICAgICAgICAgICBpZiAoY2hhaW4gfHwgY2hhaW5BbGwpIHsKICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gb2JqZWN0KHRoaXMuX193cmFwcGVkX18pLAogICAgICAgICAgICAgICAgICBhY3Rpb25zID0gcmVzdWx0Ll9fYWN0aW9uc19fID0gY29weUFycmF5KHRoaXMuX19hY3Rpb25zX18pOwoKICAgICAgICAgICAgICBhY3Rpb25zLnB1c2goeyAnZnVuYyc6IGZ1bmMsICdhcmdzJzogYXJndW1lbnRzLCAndGhpc0FyZyc6IG9iamVjdCB9KTsKICAgICAgICAgICAgICByZXN1bHQuX19jaGFpbl9fID0gY2hhaW5BbGw7CiAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZnVuYy5hcHBseShvYmplY3QsIGFycmF5UHVzaChbdGhpcy52YWx1ZSgpXSwgYXJndW1lbnRz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zIHRoZSBhcmd1bWVudCBhdCBpbmRleCBgbmAuIElmIGBuYCBpcyBuZWdhdGl2ZSwKICAgICAqIHRoZSBudGggYXJndW1lbnQgZnJvbSB0aGUgZW5kIGlzIHJldHVybmVkLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MF0gVGhlIGluZGV4IG9mIHRoZSBhcmd1bWVudCB0byByZXR1cm4uCiAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBwYXNzLXRocnUgZnVuY3Rpb24uCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBmdW5jID0gXy5udGhBcmcoMSk7CiAgICAgKiBmdW5jKCdhJywgJ2InLCAnYycsICdkJyk7CiAgICAgKiAvLyA9PiAnYicKICAgICAqCiAgICAgKiB2YXIgZnVuYyA9IF8ubnRoQXJnKC0yKTsKICAgICAqIGZ1bmMoJ2EnLCAnYicsICdjJywgJ2QnKTsKICAgICAqIC8vID0+ICdjJwogICAgICovCiAgICBmdW5jdGlvbiBudGhBcmcobikgewogICAgICBuID0gdG9JbnRlZ2VyKG4pOwogICAgICByZXR1cm4gYmFzZVJlc3QoZnVuY3Rpb24oYXJncykgewogICAgICAgIHJldHVybiBiYXNlTnRoKGFyZ3MsIG4pOwogICAgICB9KTsKICAgIH0KCiAgICAvKioKICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGludm9rZXMgYGl0ZXJhdGVlc2Agd2l0aCB0aGUgYXJndW1lbnRzIGl0IHJlY2VpdmVzCiAgICAgKiBhbmQgcmV0dXJucyB0aGVpciByZXN1bHRzLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4wLjAKICAgICAqIEBjYXRlZ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XQgYHBhdGhgIG9mIGEgZ2l2ZW4gb2JqZWN0LgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgMi40LjAKICAgICAqIEBjYXRlZ29yeSBVdGlsCiAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCBvZiB0aGUgcHJvcGVydHkgdG8gZ2V0LgogICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgYWNjZXNzb3IgZnVuY3Rpb24uCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBvYmplY3RzID0gWwogICAgICogICB7ICdhJzogeyAnYic6IDIgfSB9LAogICAgICogICB7ICdhJzogeyAnYic6IDEgfSB9CiAgICAgKiBdOwogICAgICoKICAgICAqIF8ubWFwKG9iamVjdHMsIF8ucHJvcGVydHkoJ2EuYicpKTsKICAgICAqIC8vID0+IFsyLCAxXQogICAgICoKICAgICAqIF8ubWFwKF8uc29ydEJ5KG9iamVjdHMsIF8ucHJvcGVydHkoWydhJywgJ2InXSkpLCAnYS5iJyk7CiAgICAgKiAvLyA9PiBbMSwgMl0KICAgICAqLwogICAgZnVuY3Rpb24gcHJvcGVydHkocGF0aCkgewogICAgICByZXR1cm4gaXNLZXkocGF0aCkgPyBiYXNlUHJvcGVydHkodG9LZXkocGF0aCkpIDogYmFzZVByb3BlcnR5RGVlcChwYXRoKTsKICAgIH0KCiAgICAvKioKICAgICAqIFRoZSBvcHBvc2l0ZSBvZiBgXy5wcm9wZXJ0eWA7IHRoaXMgbWV0aG9kIGNyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IHJldHVybnMKICAgICAqIHRoZSB2YWx1ZSBhdCBhIGdpdmVuIHBhdGggb2YgYG9iamVjdGAuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQG1lbWJlck9mIF8KICAgICAqIEBzaW5jZSAzLjAuMAogICAgICogQGNhd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oMCwgMjAsIDUpOwogICAgICogLy8gPT4gWzE1LCAxMCwgNSwgMF0KICAgICAqCiAgICAgKiBfLnJhbmdlUmlnaHQoMCwgLTQsIC0xKTsKICAgICAqIC8vID0+IFstMywgLTIsIC0xLCAwXQogICAgICoKICAgICAqIF8ucmFuZ2VSaWdodCgxLCA0LCAwKTsKICAgICAqIC8vID0+IFsxLCAxLCAxXQogICAgICoKICAgICAqIF8ucmFuZ2VSaWdodCgwKTsKICAgICAqIC8vID0+IFtdCiAgICAgKi8KICAgIHZhciByYW5nZVJpZ2h0ID0gY3JlYXRlUmFuZ2UodHJ1ZSk7CgogICAgLyoqCiAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIGEgbmV3IGVtcHR5IGFycmF5LgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4xMy4wCiAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgZW1wdHkgYXJyYXkuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBhcnJheXMgPSBfLnRpbWVzKDIsIF8uc3R1YkFycmF5KTsKICAgICAqCiAgICAgKiBjb25zb2xlLmxvZyhhcnJheXMpOwogICAgICogLy8gPT4gW1tdLCBbXV0KICAgICAqCiAgICAgKiBjb25zb2xlLmxvZyhhcnJheXNbMF0gPT09IGFycmF5c1sxXSk7CiAgICAgKiAvLyA9PiBmYWxzZQogICAgICovCiAgICBmdW5jdGlvbiBzdHViQXJyYXkoKSB7CiAgICAgIHJldHVybiBbXTsKICAgIH0KCiAgICAvKioKICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYGZhbHNlYC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMTMuMAogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGBmYWxzZWAuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIF8udGltZXMoMiwgXy5zdHViRmFsc2UpOwogICAgICogLy8gPT4gW2ZhbHNlLCBmYWxzZV0KICAgICAqLwogICAgZnVuY3Rpb24gc3R1YkZhbHNlKCkgewogICAgICByZXR1cm4gZmFsc2U7CiAgICB9CgogICAgLyoqCiAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIGEgbmV3IGVtcHR5IG9iamVjdC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMTMuMAogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBlbXB0eSBvYmplY3QuCiAgICAgKiBAZXhhbXBsZQogICAgICoKICAgICAqIHZhciBvYmplY3RzID0gXy50aW1lcygyLCBfLnN0dWJPYmplY3QpOwogICAgICoKICAgICAqIGNvbnNvbGUubG9nKG9iamVjdHMpOwogICAgICogLy8gPT4gW3t9LCB7fV0KICAgICAqCiAgICAgKiBjb25zb2xlLmxvZyhvYmplY3RzWzBdID09PSBvYmplY3RzWzFdKTsKICAgICAqIC8vID0+IGZhbHNlCiAgICAgKi8KICAgIGZ1bmN0aW9uIHN0dWJPYmplY3QoKSB7CiAgICAgIHJldHVybiB7fTsKICAgIH0KCiAgICAvKioKICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYW4gZW1wdHkgc3RyaW5nLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgNC4xMy4wCiAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgZW1wdHkgc3RyaW5nLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfLnRpbWVzKDIsIF8uc3R1YlN0cmluZyk7CiAgICAgKiAvLyA9PiBbJycsICcnXQogICAgICovCiAgICBmdW5jdGlvbiBzdHViU3RyaW5nKCkgewogICAgICByZXR1cm4gJyc7CiAgICB9CgogICAgLyoqCiAgICAgKiBUaGlzIG1ldGhvZCByZXR1cm5zIGB0cnVlYC4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMTMuMAogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy50aW1lcygyLCBfLnN0dWJUcnVlKTsKICAgICAqIC8vID0+IFt0cnVlLCB0cnVlXQogICAgICovCiAgICBmdW5jdGlvbiBzdHViVHJ1ZSgpIHsKICAgICAgcmV0dXJuIHRydWU7CiAgICB9CgogICAgLyoqCiAgICAgKiBJbnZva2VzIHRoZSBpdGVyYXRlZSBgbmAgdGltZXMsIHJldHVybmluZyBhbiBhcnJheSBvZiB0aGUgcmVzdWx0cyBvZgogICAgICogZWFjaCBpbnZvY2F0aW9uLiBUaGUgaXRlcmF0ZWUgaXMgaW52b2tlZCB3aXRoIG9uZSBhcmd1bWVudDsgKGluZGV4KS4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAc2luY2UgMC4xLjAKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAY2F0ZWdvcnkgVXRpbAogICAgICogQHBhcmFtIHtudW1iZXJ9IG4gVGhlIG51bWJlciBvZiB0aW1lcyB0byBpbnZva2UgYGl0ZXJhdGVlYC4KICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtpdGVyYXRlZT1fLmlkZW50aXR5XSBUaGUgZnVuY3Rpb24gaW52b2tlZCBwZXIgaXRlcmF0aW9uLgogICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBhcnJheSBvZiByZX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IEBleGFtcGxlCiAgICAgKgogICAgICogXy50b1BhdGgoJ2EuYi5jJyk7CiAgICAgKiAvLyA9PiBbJ2EnLCAnYicsICdjJ10KICAgICAqCiAgICAgKiBfLnRvUGF0aCgnYVswXS5iLmMnKTsKICAgICAqIC8vID0+IFsnYScsICcwJywgJ2InLCAnYyddCiAgICAgKi8KICAgIGZ1bmN0aW9uIHRvUGF0aCh2YWx1ZSkgewogICAgICBpZiAoaXNBcnJheSh2YWx1ZSkpIHsKICAgICAgICByZXR1cm4gYXJyYXlNYXAodmFsdWUsIHRvS2V5KTsKICAgICAgfQogICAgICByZXR1cm4gaXNTeW1ib2wodmFsdWUpID8gW3ZhbHVlXSA6IGNvcHlBcnJheShzdHJpbmdUb1BhdGgodG9TdHJpbmcodmFsdWUpKSk7CiAgICB9CgogICAgLyoqCiAgICAgKiBHZW5lcmF0ZXMgYSB1bmlxdWUgSUQuIElmIGBwcmVmaXhgIGlzIGdpdmVuLCB0aGUgSUQgaXMgYXBwZW5kZWQgdG8gaXQuCiAgICAgKgogICAgICogQHN0YXRpYwogICAgICogQHNpbmNlIDAuMS4wCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQGNhdGVnb3J5IFV0aWwKICAgICAqIEBwYXJhbSB7c3RyaW5nfSBbcHJlZml4PScnXSBUaGUgdmFsdWUgdG8gcHJlZml4IHRoZSBJRCB3aXRoLgogICAgICogQHJldHVybnMge3N0cmluZ30gUmV0dXJucyB0aGUgdW5pcXVlIElELgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfLnVuaXF1ZUlkKCdjb250YWN0XycpOwogICAgICogLy8gPT4gJ2NvbnRhY3RfMTA0JwogICAgICoKICAgICAqIF8udW5pcXVlSWQoKTsKICAgICAqIC8vID0+ICcxMDUnCiAgICAgKi8KICAgIGZ1bmN0aW9uIHVuaXF1ZUlkKHByZWZpeCkgewogICAgICB2YXIgaWQgPSArK2lkQ291bnRlcjsKICAgICAgcmV0dXJuIHRvU3RyaW5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cHJvZHVjdC4KICAgICAqIEBleGFtcGxlCiAgICAgKgogICAgICogXy5tdWx0aXBseSg2LCA0KTsKICAgICAqIC8vID0+IDI0CiAgICAgKi8KICAgIHZhciBtdWx0aXBseSA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24obXVsdGlwbGllciwgbXVsdGlwbGljYW5kKSB7CiAgICAgIHJldHVybiBtdWx0aXBsaWVyICogbXVsdGlwbGljYW5kOwogICAgfSwgMSk7CgogICAgLyoqCiAgICAgKiBDb21wdXRlcyBgbnVtYmVyYCByb3VuZGVkIHRvIGBwcmVjaXNpb25gLgogICAgICoKICAgICAqIEBzdGF0aWMKICAgICAqIEBtZW1iZXJPZiBfCiAgICAgKiBAc2luY2UgMy4xMC4wCiAgICAgKiBAY2F0ZWdvcnkgTWF0aAogICAgICogQHBhcmFtIHtudW1iZXJ9IG51bWJlciBUaGUgbnVtYmVyIHRvIHJvdW5kLgogICAgICogQHBhcmFtIHtudW1iZXJ9IFtwcmVjaXNpb249MF0gVGhlIHByZWNpc2lvbiB0byByb3VuZCB0by4KICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgdGhlIHJvdW5kZWQgbnVtYmVyLgogICAgICogQGV4YW1wbGUKICAgICAqCiAgICAgKiBfLnJvdW5kKDQuMDA2KTsKICAgICAqIC8vID0+IDQKICAgICAqCiAgICAgKiBfLnJvdW5kKDQuMDA2LCAyKTsKICAgICAqIC8vID0+IDQuMDEKICAgICAqCiAgICAgKiBfLnJvdW5kKDQwNjAsIC0yKTsKICAgICAqIC8vID0+IDQxMDAKICAgICAqLwogICAgdmFyIHJvdW5kID0gY3JlYXRlUm91bmQoJ3JvdW5kJyk7CgogICAgLyoqCiAgICAgKiBTdWJ0cmFjdCB0d28gbnVtYmVycy4KICAgICAqCiAgICAgKiBAc3RhdGljCiAgICAgKiBAbWVtYmVyT2YgXwogICAgICogQHNpbmNlIDQuMC4wCiAgICAgKiBAY2F0ZWdvcnkgTWF0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yBpdC4KICBlbHNlIGlmIChmcmVlTW9kdWxlKSB7CiAgICAvLyBFeHBvcnQgZm9yIE5vZGUuanMuCiAgICAoZnJlZU1vZHVsZS5leHBvcnRzID0gXykuXyA9IF87CiAgICAvLyBFeHBvcnQgZm9yIENvbW1vbkpTIHN1cHBvcnQuCiAgICBmcmVlRXhwb3J0cy5fID0gXzsKICB9CiAgZWxzZSB7CiAgICAvLyBFeHBvcnQgdG8gdGhlIGdsb2JhbCBvYmplY3QuCiAgICByb290Ll8gPSBfOwogIH0KfS5jYWxsKHRoaXMpKTsK"></script> </head> <body> <div class="hidden-print topbar"> <div class="container"> <div class="topbar__container"> <div class="topbar__side"> <a href="https://www.facebook.com/fig.gymnastics" target="_blank" class="topbar__icon"> <svg viewBox="0 0 19 19" width="19" height="19"><use xlink:href="#icon_facebook"></use></svg> </a> <a href="https://twitter.com/gymnastics" target="_blank" class="topbar__icon"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_x"></use></svg> </a> <a href="http://www.youtube.com/user/figchannel" target="_blank" class="topbar__icon"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_youtube"></use></svg> </a> <a href="https://www.linkedin.com/company/f%C3%A9d%C3%A9ration-internationale-de-gymnastique" target="_blank" class="topbar__icon"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_linkedin"></use></svg> </a> <a href="https://instagram.com/figymnastics" target="_blank" class="topbar__icon"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_instagram"></use></svg> </a> <a href="https://www.tiktok.com/@figymnastics" target="_blank" class="topbar__icon"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_tiktok"></use></svg> </a> <a href="https://allgymnastics.tv/" target="_blank" class="topbar__icon" style="position: relative; left: -8px;"> <svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="34" height="27" viewBox="0 0 1666.000000 1632.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,1632.000000) scale(0.100000,-0.100000)" fill="#444" stroke="none"> <path d="M7855 14063 c-395 -25 -794 -133 -1140 -307 -336 -170 -612 -391-838 -671 l-80 -100 1131 -3 c623 -1 1641 -1 2263 0 l1130 3 -84 105 c-107 134 -296 316 -434 419 -535 399 -1240 600 -1948 554z"/> <path d="M7855 12283 c-395 -25 -794 -133 -1140 -307 -336 -170 -612 -391 -838 -671 l-80 -100 1131 -3 c623 -1 1641 -1 2263 0 l1130 3 -84 105 c-173 216 -414 423 -671 576 -488 292 -1108 436 -1711 397z"/> <path d="M11010 9987 l0 -534 26 -24 c49 -46 162 -184 217 -267 198 -296 297 -629 297 -997 0 -436 -139 -825 -412 -1150 -41 -49 -87 -101 -102 -114 l-26 -24 0 -539 c0 -296 2 -538 4 -538 2 0 53 20 112 45 548 230 983 639 1245 1170 131 267 219 577 250 878 17 177 7 549 -20 706 -130 755 -539 1358 -1175 1730 -109 63 -324 165 -393 186 l-23 6 0 -534z"/> <path d="M8020 10504 c-298 -34 -474 -74 -698 -160 -653 -251 -1171 -780 -1394 -1424 -133 -381 -164 -813 -87 -1195 94 -465 315 -874 655 -1207 132 -130 211 -194 369 -300 311 -207 710 -348 1104 -389 144 -15 479 -6 621 16 248 39 474 112 715 230 402 196 734 495 972 874 l53 84 0 1132 0 1131 -71 110 c-382 587 -978 968 -1689 1079 -99 15 -469 28 -550 19z m438 -993 c123 -24 229 -60 335 -112 401 -200 669 -568 743 -1019 21 -128 14 -399 -15 -520 -124 -536 -540 -943 -1069 -1047 -130 -25 -367 -23 -499 6 -306 64 -580 231 -769 465 -469 582 -403 1427 152 1917 80 70 201 153 292 198 85 43 250 97 348 115 120 22 362 20 482 -3z"/> <path d="M3234 10349 c-541 -430 -884 -1085 -975 -1864 -16 -133 -16 -502 0 -645 62 -563 265 -1070 592 -1481 121 -152 371 -390 462 -440 16 -9 17 101 17 2246 0 1240 -1 2255 -3 2255 -2 0 -44 -32 -93 -71z"/> <path d="M5005 10343 c-117 -94 -295 -274 -385 -388 -648 -818 -784 -2030 -339 -3026 125 -282 308 -550 523 -765 101 -100 293 -261 301 -252 3 3 4 1019 3 2258 l-3 2253 -100 -80z"/> <path d="M13320 8165 c0 -1240 3 -2255 8 -2255 15 0 179 136 271 224 348 337 599 785 727 1301 66 268 78 382 78 730 0 348 -12 462 -78 730 -150 603 -470 1116 -911 1461 -46 35 -86 64 -89 64 -3 0 -6 -1015 -6 -2255z"/> <path d="M5812 5111 c9 -25 143 -185 228 -271 545 -553 1346 -846 2189 -800 608 33 1145 225 1604 572 112 85 313 283 408 401 44 54 79 100 79 103 0 2 -1015 4 -2256 4 -1388 0 -2254 -4 -2252 -9z"/> <path d="M5826 3303 c291 -391 725 -704 1212 -877 339 -119 639 -169 1022 -169 500 0 900 90 1325 298 359 176 678 438 909 748 l28 37 -2262 0 -2262 0 28 -37z"/> </g> </svg> </a> <!-- <a href="#" target="_blank" class="topbar__icon"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_dailymotion"></use></svg> </a> --> </div> <div class="topbar__side hidden-xs hidden-sm"><a href=/site/pages/ioc-integrity.php class='topbar__item' class='topbar__item'>Integrity</a><a href=/site/governance.php class='topbar__item' class='topbar__item'>Governance</a><a href=/site/pages/antidoping-about.php class='topbar__item'>Anti-doping</a><a href=/site/pages/medical-concussion.php class='topbar__item'>Medical</a><a href=/site/pages/safeguarding.php class='topbar__item' class='topbar__item'>Safeguarding</a><a href=/site/apparatus/man_view.php class='topbar__item'>Apparatus</a><a href=/site/media.php class='topbar__item' class='topbar__item'>Media</a> <!-- <svg viewBox="0 0 21 21" width="21" height="21"><use xlink:href="#icon_search"></use></svg> <span>Search</span> </a> --> </div> </div> </div> <!--<div style="background-color:#fbb97f; text-align:center;line-height:22px;"><b><a href=/site/pages/medical-covid19.php>Prevention against COVID-19</a> </b></div>--> </div><div style='display: none'><svg version="1.1" id="icon_facebook" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 19 19" style="enable-background:new 0 0 19 19;" xml:space="preserve"><path d="M17.9,0H1C0.5,0,0,0.5,0,1v16.9c0,0.6,0.5,1,1,1h9.1v-7.4H7.7V8.8h2.5V6.7c0-2.5,1.5-3.8,3.7-3.8 c1,0,1.9,0.1,2.2,0.1v2.6l-1.5,0c-1.2,0-1.4,0.6-1.4,1.4v1.8h2.8l-0.4,2.9h-2.5V19h4.8c0.6,0,1-0.5,1-1V1C19,0.5,18.5,0,17.9,0"/></svg> <svg version="1.1" id="icon_facebook_page" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 19 19" style="enable-background:new 0 0 19 19;" xml:space="preserve"><path d="M17.9,0H1C0.5,0,0,0.5,0,1v16.9c0,0.6,0.5,1,1,1h9.1v-7.4H7.7V8.8h2.5V6.7c0-2.5,1.5-3.8,3.7-3.8 c1,0,1.9,0.1,2.2,0.1v2.6l-1.5,0c-1.2,0-1.4,0.6-1.4,1.4v1.8h2.8l-0.4,2.9h-2.5V19h4.8c0.6,0,1-0.5,1-1V1C19,0.5,18.5,0,17.9,0"/></svg> <svg version="1.1" id="icon_twitter" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 23.7 18.9" style="enable-background:new 0 0 23.7 18.9;" xml:space="preserve"><path id="Twitter" d="M23.7,2.2c-0.9,0.4-1.8,0.6-2.8,0.8c1-0.6,1.8-1.5,2.1-2.6c-0.9,0.5-2,0.9-3.1,1.2C19.1,0.6,17.8,0,16.4,0 c-2.7,0-4.9,2.1-4.9,4.8c0,0.4,0,0.7,0.1,1.1c-4-0.2-7.6-2.1-10-5C1.2,1.6,1,2.4,1,3.3c0,1.7,0.9,3.1,2.2,4C2.4,7.2,1.6,7,1,6.7 c0,0,0,0,0,0.1C1,9,2.6,11,4.9,11.4c-0.4,0.1-0.8,0.2-1.3,0.2c-0.3,0-0.6,0-0.9-0.1c0.6,1.9,2.4,3.3,4.5,3.3c-1.7,1.3-3.8,2-6,2 c-0.4,0-0.8,0-1.2-0.1c2.2,1.4,4.7,2.1,7.5,2.1c9,0,13.9-7.3,13.9-13.6c0-0.2,0-0.4,0-0.6C22.3,4,23.1,3.2,23.7,2.2"/></svg> <svg version="1.1" id="icon_youtube" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 17.6 17.9" style="enable-background:new 0 0 17.6 17.9;" xml:space="preserve"><path d="M13.9,12.6c0-0.2,0-0.3-0.1-0.4c-0.1-0.1-0.2-0.1-0.3-0.1c-0.1,0-0.2,0-0.3,0.1c-0.1,0.1-0.1,0.2-0.1,0.4V13 h0.8V12.6z"/><path d="M10.5,15.3c0.1,0,0.2,0,0.2-0.1c0.1-0.1,0.1-0.2,0.1-0.3v-2.4c0-0.2,0-0.3-0.1-0.4C10.7,12,10.6,12,10.5,12 c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1,0.1-0.2,0.1v2.9c0.1,0.1,0.1,0.1,0.2,0.2C10.4,15.3,10.4,15.3,10.5,15.3"/><path d="M2.5,9.7h3.1v0.9h-1V16h-1v-5.4h-1V9.7z M6,11.3h0.9v3.5c0,0.1,0,0.2,0.1,0.2c0,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1-0.1,0.2-0.1,0.3-0.2v-3.5h0.9V16H7.6v-0.5c-0.2,0.2-0.3,0.3-0.5,0.4C6.9,16,6.8,16,6.6,16 c-0.2,0-0.4-0.1-0.5-0.2C6,15.7,6,15.5,6,15.2V11.3z M9.2,9.7h0.9v2c0.1-0.1,0.2-0.2,0.4-0.3c0.1-0.1,0.3-0.1,0.4-0.1 c0.3,0,0.5,0.1,0.6,0.3c0.2,0.2,0.2,0.5,0.2,0.9V15c0,0.3-0.1,0.6-0.2,0.8c-0.1,0.2-0.3,0.3-0.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3V1.8h-1v4.3c0,0.3,0.1,0.5,0.2,0.7C11.2,6.9,11.4,7,11.6,7"/><polygon points="4.6,6.9 5.8,6.9 5.8,4 7.1,0 5.9,0 5.2,2.8 5.2,2.8 4.4,0 3.3,0 4.6,4.2 "/></svg> <svg version="1.1" id="icon_linkedin" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 19 19" style="enable-background:new 0 0 19 19;" xml:space="preserve"><path d="M17.6,0H1.4C0.6,0,0,0.6,0,1.4v16.3C0,18.4,0.6,19,1.4,19h16.2c0.8,0,1.4-0.6,1.4-1.4V1.4C19,0.6,18.4,0,17.6,0z M5.6,16.2 H2.8V7.1h2.8V16.2z M4.2,5.9c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6c0.9,0,1.6,0.7,1.6,1.6C5.9,5.2,5.1,5.9,4.2,5.9z M16.2,16.2h-2.8v-4.4c0-1.1,0-2.4-1.5-2.4c-1.5,0-1.7,1.1-1.7,2.3v4.5H7.4V7.1h2.7v1.2h0c0.4-0.7,1.3-1.5,2.7-1.5 c2.9,0,3.4,1.9,3.4,4.3V16.2z"/></svg> <svg version="1.1" id="icon_tiktok" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg"><path d="M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"/></svg><svg version="1.1" id="icon_x" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 14.8 14.8" style="enable-background:new 0 0 15 15;" xml:space="preserve"> <path d="M12.6,0.75h2.454l-5.36,6.142L16,15.25h-4.937l-3.867-5.07-4.425,5.07H0.316l5.733-6.57L0,0.75h5.063l3.495,4.633L12.601,0.75Zm-0.86,13.028h1.36L4.323,2.145H2.865z"/> </svg><svg version="1.1" id="icon_instagram" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.7 18.9" style="enable-background:new 0 0 18.7 18.9;" xml:space="preserve"><path d="M9.3,0C6.8,0,6.5,0,5.5,0.1c-1,0-1.7,0.2-2.3,0.4C2.6,0.7,2.1,1.1,1.6,1.6C1,2.1,0.7,2.6,0.5,3.3 C0.3,3.9,0.1,4.5,0.1,5.5C0,6.6,0,6.9,0,9.4s0,2.9,0.1,3.9c0,1,0.2,1.7,0.4,2.3c0.2,0.6,0.6,1.1,1.1,1.7c0.5,0.5,1,0.8,1.7,1.1 c0.6,0.2,1.3,0.4,2.3,0.4c1,0,1.3,0.1,3.8,0.1c2.5,0,2.9,0,3.8-0.1c1,0,1.7-0.2,2.3-0.4c0.6-0.2,1.1-0.6,1.7-1.1 c0.5-0.5,0.8-1.1,1.1-1.7c0.2-0.6,0.4-1.3,0.4-2.3c0-1,0.1-1.3,0.1-3.9c0-2.6,0-2.9-0.1-3.9c0-1-0.2-1.7-0.4-2.3 c-0.2-0.6-0.6-1.1-1.1-1.7c-0.5-0.5-1-0.8-1.7-1.1c-0.6-0.2-1.3-0.4-2.3-0.4C12.2,0,11.9,0,9.3,0 M9.3,1.7c2.5,0,2.8,0,3.8,0.1 c0.9,0,1.4,0.2,1.7,0.3c0.4,0.2,0.7,0.4,1.1,0.7c0.3,0.3,0.5,0.6,0.7,1.1c0.1,0.3,0.3,0.8,0.3,1.8c0,1,0.1,1.3,0.1,3.8 c0,2.5,0,2.8-0.1,3.8c0,0.9-0.2,1.4-0.3,1.8c-0.2,0.4-0.4,0.8-0.7,1.1c-0.3,0.3-0.6,0.5-1.1,0.7c-0.3,0.1-0.8,0.3-1.7,0.3 c-1,0-1.3,0.1-3.8,0.1s-2.8,0-3.8-0.1c-0.9,0-1.4-0.2-1.7-0.3c-0.4-0.2-0.7-0.4-1.1-0.7c-0.3-0.3-0.5-0.6-0.7-1.1 c-0.1-0.3-0.3-0.8-0.3-1.8c0-1-0.1-1.3-0.1-3.8c0-2.5,0-2.8,0.1-3.8c0-0.9,0.2-1.4,0.3-1.8c0.2-0.4,0.4-0.8,0.7-1.1 c0.3-0.3,0.6-0.5,1.1-0.7C4.2,2,4.6,1.8,5.6,1.8C6.5,1.7,6.8,1.7,9.3,1.7"/> <path d="M9.4,12.6c-1.7,0-3.1-1.4-3.1-3.1s1.4-3.1,3.1-3.1s3.1,1.4,3.1,3.1S11.1,12.6,9.4,12.6 M9.4,4.6 c-2.6,0-4.8,2.2-4.8,4.8c0,2.7,2.1,4.8,4.8,4.8s4.8-2.2,4.8-4.8C14.2,6.7,12,4.6,9.4,4.6"/> <path d="M15.4,4.4c0,0.6-0.5,1.1-1.1,1.1c-0.6,0-1.1-0.5-1.1-1.1s0.5-1.1,1.1-1.1C14.9,3.3,15.4,3.8,15.4,4.4"/> </svg> <svg version="1.1" id="icon_dailymotion" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 13.1 17" style="enable-background:new 0 0 13.1 17;" xml:space="preserve"><path d="M6.8,13.8c-1.8,0-3.2-1.3-3.2-3c0-1.6,1.3-3,3-3c1.7,0,3,1.3,3,3.1C9.6,12.5,8.3,13.8,6.8,13.8z M9.5,0.7 v5.3C8.7,5,7.5,4.5,6,4.5C4.5,4.5,3.1,5.1,2,6.2C0.7,7.4,0,9,0,10.8c0,1.9,0.7,3.6,2.1,4.8C3.2,16.5,4.5,17,6,17 c1.5,0,2.6-0.4,3.6-1.4v1.4h3.5V0L9.5,0.7z"/></svg> <svg version="1.1" id="icon_vk_page" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24" style="enable-background:new 0 0 23.7 18.9;" xml:space="preserve"><path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm.25 16.996h-2.134c-1.205 0-1.409-.687-2.401-1.679-.897-.897-1.395-.209-1.374 1.068.006.339-.161.611-.566.611-1.264 0-3.08.178-4.918-1.806-1.883-2.033-3.857-6.111-3.857-6.513 0-.237.196-.344.524-.344h2.17c.574 0 .623.284.783.649.667 1.521 2.265 4.574 2.69 2.87.244-.978.344-3.245-.703-3.44-.594-.11.452-.746 1.968-.746.377 0 .786.041 1.205.137.769.179.771.523.761 1.026-.039 1.903-.269 3.184.233 3.507.479.31 1.739-1.717 2.403-3.281.183-.433.219-.722.734-.722h2.654c1.39 0-.182 1.997-1.383 3.557-.968 1.255-.916 1.28.209 2.324.803.744 1.75 1.76 1.75 2.336.002.272-.21.446-.748.446z"/></svg><svg version="1.1" id="icon_vk_profile" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24" style="enable-background:new 0 0 23.7 18.9;" xml:space="preserve"><path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm.25 16.996h-2.134c-1.205 0-1.409-.687-2.401-1.679-.897-.897-1.395-.209-1.374 1.068.006.339-.161.611-.566.611-1.264 0-3.08.178-4.918-1.806-1.883-2.033-3.857-6.111-3.857-6.513 0-.237.196-.344.524-.344h2.17c.574 0 .623.284.783.649.667 1.521 2.265 4.574 2.69 2.87.244-.978.344-3.245-.703-3.44-.594-.11.452-.746 1.968-.746.377 0 .786.041 1.205.137.769.179.771.523.761 1.026-.039 1.903-.269 3.184.233 3.507.479.31 1.739-1.717 2.403-3.281.183-.433.219-.722.734-.722h2.654c1.39 0-.182 1.997-1.383 3.557-.968 1.255-.916 1.28.209 2.324.803.744 1.75 1.76 1.75 2.336.002.272-.21.446-.748.446z"/></svg><svg id="icon_search" width="21px" height="21px" viewBox="0 0 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1487.000000, -20.000000)" stroke="#444444" stroke-width="3"><g transform="translate(1489.000000, 22.000000)"><path d="M14.0869565,7.04347826 C14.0869565,10.9334348 10.9334348,14.0869565 7.04347826,14.0869565 C3.15352174,14.0869565 0,10.9334348 0,7.04347826 C0,3.15352174 3.15352174,0 7.04347826,0 C10.9334348,0 14.0869565,3.15352174 14.0869565,7.04347826 Z"></path><path d="M12.5217391,12.5217391 L18,18"></path></g></g></g></svg> <svg id="seperator" width="69px" height="10px" viewBox="0 0 69 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><g transform="translate(-968.000000, -651.000000)" stroke="currentColor" stroke-width="2.4"><g transform="translate(0.000000, 233.000000)"><g transform="translate(970.000000, 198.000000)"><g transform="translate(0.000000, 222.000000)"><path d="M0,6 C0,2.68635 2.9102125,0 6.5,0 C10.0897875,0 13,2.68635 13,6"></path><path d="M13,6 C13,2.68635 15.9102125,0 19.5,0 C23.0897875,0 26,2.68635 26,6"></path><path d="M26,6 C26,2.68635 28.9102125,0 32.5,0 C36.0897875,0 39,2.68635 39,6"></path><path d="M39,6 C39,2.68635 41.9102125,0 45.5,0 C49.08995,0 52,2.68635 52,6"></path><path d="M52,6 C52,2.68635 54.91005,0 58.5,0 C62.08995,0 65,2.68635 65,6"></path></g></g></g></g></g></svg> <svg id="button_right_arrow" width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path fill="currentColor" d="M50,100 C22.3864708,100 0,77.6147096 0,50.0007604 C0,22.3868112 22.3864708,0 50,0 C77.6135292,0 100,22.3868112 100,50.0007604 C100,77.6147096 77.6135292,100 50,100 Z"></path> <polyline stroke="#F4EDEB" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" points="45.9183673 30.3030303 66.3265306 49.9992477 45.9183673 69.6969697"></polyline> </g> </svg> <svg id="icon_sport_gfa" width="39px" height="44px" viewBox="0 0 39 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1247.000000, -4247.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-1" transform="translate(105.000000, 259.000000)"> <g id="GFA" transform="translate(43.000000, 0.000000)"> <path d="M7.06228421,12.2960369 C5.90870526,11.4464985 5.39349474,10.1732062 5.91007368,9.45160615 C6.42665263,8.73000615 7.78070526,8.83425231 8.93428421,9.68379077 C10.0871789,10.5333292 10.6030737,11.8066215 10.0864947,12.5282215 C9.56991579,13.2491446 8.21586316,13.1455754 7.06228421,12.2960369" id="Fill-2"></path> <path d="M14.0680526,27.7664369 C12.9137895,26.3983754 7.03778947,17.8535754 11.6698947,10.8359138 C7.89442105,5.91129846 3.73305263,3.05603692 0.290789474,0.440406154 C0.290789474,0.440406154 14.0420526,6.73714462 19.097,16.9370215 C24.3024737,27.9898215 21.9877895,43.85216 21.9877895,43.85216 C21.4219474,35.8983138 20.2102105,29.8148062 18.5872632,24.6363446 C16.731,34.3325908 4.56710526,43.0412062 4.56710526,43.0412062 C9.66584211,36.6530831 12.8357895,32.5231754 14.6482632,28.2842831 C16.2992632,24.3838523 17.7087368,18.6239138 12.7352105,12.7082831 C9.13284211,16.8090831 12.8918947,26.2988677 14.0680526,27.7664369" id="Fill-4"></path> <path d="M15.0533158,12.2960369 C13.8997368,11.4464985 13.3838421,10.1732062 13.9011053,9.45160615 C14.4176842,8.73000615 15.7717368,8.83425231 16.9246316,9.68379077 C18.0782105,10.5333292 18.5941053,11.8066215 18.0768421,12.5282215 C17.5602632,13.2491446 16.2068947,13.1455754 15.0533158,12.2960369" id="Fill-6"></path> <path d="M22.0471105,27.73672 C20.8928474,26.3686585 15.0284789,17.8536431 19.6605842,10.8359815 C15.8851105,5.91136615 11.7244263,3.05610462 8.28147895,0.440473846 C8.28147895,0.440473846 22.0327421,6.73721231 27.0876895,16.9370892 C32.2938474,27.9898892 29.9784789,43.8522277 29.9784789,43.8522277 C29.4126368,35.8983815 28.2009,29.8148738 26.5786368,24.6364123 C24.7216895,34.3326585 12.5584789,43.0412738 12.5584789,43.0412738 C17.6565316,36.6531508 20.8271632,32.5232431 22.6382684,28.2843508 C24.2899526,24.38392 25.7001105,18.6239815 20.7259,12.7083508 C17.1235316,16.8091508 20.8709526,26.2691508 22.0471105,27.73672" id="Fill-8"></path> <path d="M23.0440053,12.2960369 C21.8904263,11.4464985 21.3752158,10.1732062 21.8917947,9.45160615 C22.4083737,8.73000615 23.7624263,8.83425231 24.9153211,9.68379077 C26.0689,10.5333292 26.5854789,11.8066215 26.0682158,12.5282215 C25.5509526,13.2491446 24.1975842,13.1455754 23.0440053,12.2960369" id="Fill-10"></path> <path d="M30.0384158,27.73672 C28.8841526,26.3686585 23.0191,17.8536431 27.6512053,10.8359815 C23.8757316,5.91136615 19.7150474,3.05610462 16.2721,0.440473846 C16.2721,0.440473846 30.0240474,6.73721231 35.0783105,16.9370892 C40.2844684,27.9898892 37.9691,43.8522277 37.9691,43.8522277 C37.4039421,35.8983815 36.1915211,29.8148738 34.5692579,24.6364123 C32.7123105,34.3326585 20.5491,43.0412738 20.5491,43.0412738 C25.6478368,36.6531508 28.8177842,32.5232431 30.6295737,28.2843508 C32.2805737,24.38392 33.6907316,18.6239815 28.7172053,12.7083508 C25.1141526,16.8091508 28.8615737,26.2691508 30.0384158,27.73672" id="Fill-12"></path> </g> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_mag" width="57px" height="47px" viewBox="0 0 57 47" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1519.000000, -4246.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-2" transform="translate(353.000000, 257.000000)"> <g id="MAG" transform="translate(67.000000, 0.000000)"> <path d="M38.8199038,17.436 C38.8199038,17.436 37.2830547,26.1850909 31.6712434,26.844 C26.0583566,27.504 24.0504509,16.3570909 24.9957906,1.01454545 C24.9957906,1.01454545 19.3226774,25.7050909 28.4813943,31.5785455 C28.4813943,31.5785455 22.7512811,32.2985455 0.653564151,28.2229091 C0.653564151,28.2229091 15.4251679,36.7930909 32.3219038,34.9363636 C32.3219038,34.9363636 30.5484509,39.6098182 29.8386396,40.6887273 C29.8386396,40.6887273 32.3219038,38.8909091 34.743866,34.1552727 C34.743866,34.1552727 37.6379604,33.0763636 39.2920358,30.4396364 C39.2920358,30.4396364 39.1748094,34.2752727 36.3979415,40.6887273 C36.3979415,40.6887273 42.2463566,33.9163636 42.2463566,26.4850909 C42.2463566,19.0538182 38.8199038,17.436 38.8199038,17.436" id="Fill-2"></path> <path d="M6.72481698,45.0778909 C6.72481698,45.0778909 14.4639113,43.4600727 29.8248736,43.4600727 C45.1858358,43.4600727 56.6482132,45.0778909 56.6482132,45.0778909 C56.6482132,45.0778909 45.1858358,47.2946182 29.9431755,47.2946182 C14.7005151,47.2946182 6.72481698,45.0778909 6.72481698,45.0778909" id="Fill-4"></path> <path d="M38.5489925,14.5653818 C38.5489925,16.4122909 37.5961245,17.9090182 36.4217094,17.9090182 C35.2483698,17.9090182 34.2965774,16.4122909 34.2965774,14.5653818 C34.2965774,12.7184727 35.2483698,11.2217455 36.4217094,11.2217455 C37.5961245,11.2217455 38.5489925,12.7184727 38.5489925,14.5653818" id="Fill-6"></path> <path d="M29.4000623,41.4417818 C30.5282321,41.4417818 31.4574396,42.6243273 31.6101566,44.1592364 C31.6241377,44.0141455 31.6327415,43.8701455 31.6327415,43.7196 C31.6327415,41.9752364 30.6336283,40.5636 29.4000623,40.5636 C28.1664962,40.5636 27.1663075,41.9752364 27.1663075,43.7196 C27.1663075,43.8701455 27.1759868,44.0141455 27.1899679,44.1592364 C27.3416094,42.6243273 28.2718925,41.4417818 29.4000623,41.4417818" id="Fill-8"></path> <path d="M36.3150226,41.4417818 C37.4431925,41.4417818 38.3734755,42.6243273 38.525117,44.1592364 C38.5390981,44.0141455 38.5487774,43.8701455 38.5487774,43.7196 C38.5487774,41.9752364 37.5485887,40.5636 36.3150226,40.5636 C35.0825321,40.5636 34.0823434,41.9752364 34.0823434,43.7196 C34.0823434,43.8701455 34.0920226,44.0141455 34.1049283,44.1592364 C34.2576453,42.6243273 35.1879283,41.4417818 36.3150226,41.4417818" id="Fill-10"></path> </g> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_wag" width="33px" height="52px" viewBox="0 0 33 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g transform="translate(-1256.000000, -4368.000000)" fill="currentColor"> <g transform="translate(0.000000, 3988.000000)"> <g transform="translate(1099.000000, 0.000000)"> <g transform="translate(66.000000, 380.000000)"> <path d="M105.601755,34.627168 C106.017374,35.1752544 106.902026,35.5559408 107.932728,35.5559408 C109.364027,35.5559408 110.523254,34.8302574 110.523254,33.9337749 C110.523254,33.0372924 109.364027,32.3116089 107.932728,32.3116089 C107.162414,32.3116089 106.478061,32.525745 106.004021,32.8613948 C106.565691,30.9324704 107.462861,29.5635289 108.859108,29.3035064 C108.859108,29.3035064 114.062694,38.4790686 123.530133,46.2831401 C123.530133,46.2831401 114.897271,37.9513761 110.75777,24.4837446 C108.627096,17.5506632 108.477707,9.63442529 109.656129,0 C109.656129,0 105.531651,13.7454986 107.499583,24.4837446 C107.499583,24.4837446 98.6872866,28.158898 100.281328,49.8265828 C100.281328,49.8265828 100.563415,40.9492816 103.562884,34.7928685 C103.562884,34.7928685 103.519486,43.3838052 105.673529,50.4698408 C97.5597734,50.6210957 91,51.018777 91,51.018777 C106.46888,53.358129 124,50.7799983 124,50.7799983 C118.402494,50.3806175 111.70585,50.3593738 105.810399,50.4664419 C105.509952,48.039566 104.658683,40.0791412 105.601755,34.627168 Z"></path> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_rg" width="38px" height="52px" viewBox="0 0 38 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1528.000000, -4368.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-4" transform="translate(367.000000, 380.000000)"> <path d="M85.8983398,13.781566 C86.3529997,14.4979163 85.8014844,15.6893802 84.6664357,16.4425294 C83.5305864,17.1964962 82.2410494,17.2259353 81.7863895,16.509585 C81.3309292,15.7940524 81.8824444,14.6034062 83.0182936,13.8494394 C84.1541429,13.0962902 85.4444804,13.0660334 85.8983398,13.781566 M66.0381882,28.8281936 C66.3039401,29.0269072 66.5808984,29.2100835 66.870664,29.3736338 C66.5608869,29.2059947 66.2823277,29.0236362 66.0381882,28.8281936 M87.8602612,25.0370976 C88.8504271,24.2201639 89.5716394,23.3132775 90.0671226,22.3458774 C88.5438519,22.2673733 87.006173,22.110365 85.5741545,21.8323295 C86.2825594,22.6623473 87.0461959,23.7123402 87.8602612,25.0370976 M90.6082319,20.9884099 C92.1026861,15.9265282 88.5814734,9.56932803 85.4572877,4.83127585 C75.3146904,16.2094702 82.6412781,19.6693768 90.6082319,20.9884099 M85.4196662,4.774851 C85.0498548,4.21550897 82.5828447,0.509459183 82.2346457,0 C82.2346457,0 93.5819316,11.323405 93.0072031,21.3277768 C95.6679239,21.6450644 98.2109774,21.7873532 100,21.9729827 C98.8857631,22.0997342 96.0713545,22.3884005 92.8367056,22.4039378 C92.4028576,24.407429 91.3046299,26.2997059 89.25786,27.9196716 C93.8773004,40.6610577 86.8412788,52 86.8412788,52 C90.8483691,32.3952256 86.6683799,27.2908207 79.7180073,19.1492868 C79.6403629,19.0168111 79.544308,18.8982371 79.4554572,18.7755744 C77.9634044,16.6780418 77.8729527,14.5960465 78.4925068,12.702134 C77.9289847,13.8617056 77.2982242,15.1913696 76.6306426,16.35503 L76.6738673,16.3934643 C78.4708944,17.6969602 79.609145,19.7315259 79.609145,22.3098964 C79.609145,23.5201686 79.3578014,24.6707449 78.9063433,25.7117426 C81.0947942,27.4110302 82.3947372,29.8144019 82.1818155,32.2970954 C81.8072014,36.6475334 76.9908485,39.7721619 71.4244668,39.2774222 C65.8580852,38.7818648 61.6492796,34.8542043 62.0230932,30.5029486 L62.0391024,30.3361273 C61.8133734,34.266241 66.0862156,38.1472896 71.2915909,38.610137 C76.5650051,39.0803441 81.0875901,36.1192659 81.4309864,32.1261853 C81.6094884,30.050732 80.3327586,27.829719 78.5973667,26.3463178 C77.1845592,28.9770243 74.4309853,30.7613581 71.2667767,30.7613581 C70.2397897,30.7613581 69.2560274,30.5724575 68.3483086,30.2290019 C65.7708354,29.5420906 64.0570558,28.0570539 64.2571702,26.45099 C64.5149175,24.3902562 67.8216075,22.910126 71.6445927,23.1448206 C73.7401905,23.2732076 75.350711,23.7025272 76.5682069,24.3248361 C77.1749537,24.5930585 77.7456799,24.9070751 78.2747823,25.2587083 C78.5709516,24.4458633 78.7310431,23.5700514 78.7310431,22.6574408 C78.7310431,21.3825662 78.4372752,20.1453082 77.9105742,19.0487034 L77.904971,19.105946 L77.8953655,19.1893566 C77.8993678,19.1362028 77.9009687,19.0814135 77.9001682,19.0274419 C77.5015404,18.2072371 76.9724379,17.4655365 76.3376751,16.8489519 C74.3701505,20.8624762 66.870664,21.3179638 66.8786686,17.7492963 C66.8834713,15.706553 69.9180058,12.5263174 76.2688358,16.0679992 C77.2878182,14.5379861 78.261975,12.7062228 79.0280129,11.4166287 C80.7666066,7.98616113 84.5015414,5.38080486 85.4196662,4.774851 M75.9646619,16.5120382 C73.6433351,14.59114 67.3621449,13.5640441 67.3637458,17.717404 C67.3653467,20.1575744 73.2294986,20.5484596 75.9646619,16.5120382 M64.9399604,26.6758716 C64.8415042,27.4584598 65.259343,28.2067024 66.0381882,28.8281936 C66.2823277,29.0236362 66.5608869,29.2059947 66.870664,29.3736338 C67.7711787,29.8610137 68.9286403,30.2224599 70.2325856,30.3925522 C70.4294981,30.4072717 70.6272111,30.4138137 70.828126,30.4138137 C74.0179492,30.4138137 76.7667204,28.5591533 78.0154341,25.8883769 C76.4705511,24.7656041 74.4614027,23.9977355 72.2209221,23.7990218 C70.2101728,23.6199343 68.3042834,23.9241378 66.6953638,24.591423 C65.6939914,25.1303213 65.0416185,25.8548491 64.9399604,26.6758716" id="RG"></path> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_tra" width="41px" height="53px" viewBox="0 0 41 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1252.000000, -4495.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-5" transform="translate(86.000000, 506.000000)"> <g id="TRA" transform="translate(67.000000, 0.000000)"> <path d="M0.832634694,47.350575 L40.8787571,47.2071375 C40.8787571,47.2071375 33.0318592,49.8455438 19.9553694,49.8455438 C16.8033898,49.8455438 14.0614102,49.7004188 11.7118592,49.4802 C4.31512449,48.7874812 0.832634694,47.350575 0.832634694,47.350575" id="Fill-2"></path> <path d="M15.8734429,34.440525 C16.465851,35.1821812 16.0675653,36.4975875 14.9831571,37.3818375 C13.8979122,38.2644 12.5373816,38.3799938 11.9441367,37.6391813 C11.3508918,36.8983688 11.7500143,35.5821188 12.8352592,34.6987125 C13.9196673,33.8153062 15.280198,33.6997125 15.8734429,34.440525" id="Fill-4"></path> <path d="M12.4260122,21.6520594 C12.4260122,21.6520594 9.10333878,31.0978406 16.2431959,33.8417156 C23.3838898,36.5864344 31.3370531,29.5647469 31.3370531,29.5647469 C31.3370531,29.5647469 23.9135429,32.7018094 19.8486857,32.2740281 C19.8486857,32.2740281 30.9471347,25.3586531 27.1291143,0.765871875 C27.1291143,0.765871875 27.5190327,10.6748719 24.6557265,19.1216531 C22.3781347,25.8421219 17.4305224,30.9442781 15.8189714,30.8480906 C15.8189714,30.8480906 12.2494612,31.8816844 12.4260122,21.6520594" id="Fill-6"></path> <polygon id="Fill-8" points="14.4054755 53.8756313 17.2562306 49.3851938 14.5234551 52.1881313 11.8367 49.0755375"></polygon> <polygon id="Fill-10" points="27.9309571 53.8756313 25.080202 49.3851938 27.8129776 52.1881313 30.4997327 49.0755375"></polygon> </g> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_acro" width="32px" height="52px" viewBox="0 0 32 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1532.000000, -4495.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-6" transform="translate(367.000000, 507.000000)"> <g id="ACRO" transform="translate(66.000000, 0.000000)"> <path d="M16.5731902,18.6738985 C17.0766049,16.3393313 17.7657756,13.9356896 18.9989463,11.4808239 C18.9989463,11.4808239 11.6046049,21.6386746 13.7314341,31.9796896 C13.7314341,31.9796896 5.64401951,39.0571224 4.53416585,51.4649433 C4.53416585,51.4649433 7.81533659,40.4813015 14.8405073,35.2875104 C14.8405073,35.2875104 18.6766049,45.0309134 29.5378732,51.7404657 C29.5378732,51.7404657 12.5380683,37.4226149 16.5731902,18.6738985" id="Fill-2"></path> <path d="M11.2682927,19.8328 C11.1254634,21.093994 11.7022439,22.1945313 12.558439,22.2907701 C13.4154146,22.387009 14.225561,21.4416955 14.3683902,20.1812776 C14.5112195,18.9200836 13.934439,17.8195463 13.0774634,17.7240836 C12.2212683,17.6278448 11.4119024,18.571606 11.2682927,19.8328" id="Fill-4"></path> <path d="M20.4062439,15.2836537 C19.5289756,16.2468179 19.3354146,17.4940418 19.9738537,18.0691463 C20.6122927,18.6442507 21.8407805,18.3299224 22.7188293,17.3667582 C23.5953171,16.403594 23.7896585,15.155594 23.1512195,14.5812657 C22.5127805,14.0061612 21.2842927,14.3204896 20.4062439,15.2836537" id="Fill-6"></path> <path d="M14.5937171,9.56660299 C14.5937171,9.56660299 5.81322927,12.4157373 0.266302439,24.7017075 C0.266302439,24.7017075 7.84561951,12.3552 18.1371317,11.282603 C22.9121561,10.8231403 29.2903024,24.7017075 29.2903024,24.7017075 C29.2903024,24.7017075 27.3804488,17.5637373 24.8235707,13.4270209 C24.8235707,13.4270209 27.9970341,15.6327522 31.4171317,20.2902448 C31.4171317,20.2902448 26.5429854,10.424991 19.5982049,8.86188657 C19.5982049,8.86188657 21.7726439,7.11561791 21.7726439,4.66463284 C21.7726439,2.21287164 17.1818146,-0.391008955 6.30571707,1.23263284 C6.30571707,1.23263284 19.1931317,1.13561791 19.2462049,4.76087164 C19.2774244,6.84475224 14.5937171,9.56660299 14.5937171,9.56660299" id="Fill-8"></path> </g> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_aer" width="75px" height="43px" viewBox="0 0 75 43" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1235.000000, -4621.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-7" transform="translate(101.000000, 633.000000)"> <g id="AER" transform="translate(35.000000, 0.000000)"> <path d="M46.5052,28.0065333 C46.8825333,20.8998667 45.0585333,13.0425333 36.7945333,8.7532 C36.7945333,8.7532 36.8332,14.9892 29.3998667,26.1238667 C11.4865333,22.0692 0.0625333333,13.4078667 0.0625333333,13.4078667 C10.7345333,22.2118667 19.2092,27.4132 26.4385333,30.2745333 C25.1132,32.0238667 23.6265333,33.8638667 21.9385333,35.8012 C21.9385333,35.8012 24.7118667,34.1305333 28.1625333,30.9225333 C32.2532,32.3718667 35.9505333,33.0678667 39.4372,33.2505333 C40.7932,33.3212 42.2972,33.2318667 43.8878667,33.0345333 C43.7892,35.7612 43.4998667,39.0478667 42.9038667,42.9718667 C42.9038667,42.9718667 44.9105333,38.5345333 45.9465333,32.7238667 C58.3692,30.5292 74.8572,22.4972 74.8572,22.4972 C64.6118667,25.2105333 55.1812,27.6692 46.5052,28.0065333 M35.5038667,27.2705333 C34.3772,27.1025333 33.2678667,26.9185333 32.1825333,26.7092 C34.1852,24.3412 36.1558667,21.5278667 37.7558667,18.2865333 C37.7558667,18.2865333 38.5398667,22.6798667 35.5038667,27.2705333 M41.3972,27.9332 C41.6025333,27.6012 43.1998667,24.8838667 42.8545333,21.9078667 C42.8545333,21.9078667 43.6118667,23.7118667 43.8572,28.0345333 C43.0305333,28.0225333 42.2105333,27.9905333 41.3972,27.9332" id="Fill-2"></path> <path d="M35.916,8.08666667 C37.3,8.08666667 38.4213333,6.312 38.4213333,4.124 C38.4213333,1.93466667 37.3,0.16 35.916,0.16 C34.532,0.16 33.412,1.93466667 33.412,4.124 C33.412,6.312 34.532,8.08666667 35.916,8.08666667" id="Fill-4"></path> </g> </g> </g> </g> </g> </g> </svg> <svg id="icon_sport_pk" width="38px" height="44px" viewBox="0 0 38 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="Design---Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Homepage---Desktop---Axe-2" transform="translate(-1530.000000, -4621.000000)" fill="currentColor"> <g id="Sport-events" transform="translate(0.000000, 3988.000000)"> <g id="Sidebar---Search" transform="translate(1099.000000, 0.000000)"> <g id="Category-8" transform="translate(419.000000, 633.000000)"> <g id="PK" transform="translate(12.000000, 0.000000)"> <path d="M19.396625,8.54621429 C19.3214167,8.54621429 19.2438333,8.547 19.1630833,8.54857143 C10.053375,8.66171429 2.54758333,15.3787857 1.280125,24.0986429 C1.280125,24.0947143 1.28091667,24.0915714 1.28170833,24.0884286 C1.28170833,24.0884286 5.36670833,10.8114286 16.7587917,10.2402143 C20.57225,10.0492857 22.935375,10.9976429 24.39125,12.3427857 C27.4850833,15.9767143 26.3941667,19.4778571 26.3094583,20.0050714 C26.2239583,20.548 25.619125,20.405 25.619125,20.405 C15.924375,18.9490714 12.9326667,19.3772857 11.839375,19.6915714 C10.7460833,20.0050714 10.9764583,20.6619286 10.9764583,20.6619286 C10.9764583,20.6619286 11.1205417,21.3761429 11.839375,22.033 C14.0259583,23.9462143 16.0399583,24.8018571 16.4714167,25.0014286 C16.902875,25.2017857 16.644,24.6596429 16.644,24.6596429 C16.644,24.6596429 14.8310833,23.3742143 15.406625,23.2029286 C16.7302917,24.0027857 19.6935,24.6879286 19.6935,24.6879286 C19.6935,24.6879286 20.5849167,24.8882857 19.6642083,25.1444286 C8.998875,28.9590714 3.54745833,34.3954286 1.731375,36.5074286 L1.02283333,37.3937143 C1.02283333,37.3937143 0.362583333,38.401 1.26270833,37.7842143 C1.95304167,37.1752857 6.63258333,32.835 12.4244167,30.6648571 C17.2575417,29.447 19.21375,29.2183571 22.743,28.9135 C26.27225,28.6086429 28.649625,28.2283571 30.644625,24.0412857 C32.2936667,20.8049286 32.0640833,19.2916429 32.0640833,19.2916429 C32.0640833,19.2916429 36.743625,22.6325 36.263875,27.8284286 C35.7849167,33.0180714 34.1778333,38.1503571 25.8843333,43.7085 C32.7924167,41.1093571 37.703125,34.4818571 37.703125,26.7150714 C37.703125,16.6807143 29.507,8.54621429 19.396625,8.54621429" id="Fill-2"></path> <path d="M26.1481958,0.856742857 C25.6739875,1.19617143 25.6676542,1.78388571 25.9843208,1.55681429 C27.1868625,0.6941 29.1256542,1.8986 30.3155292,4.2471 C31.0359458,5.6716 31.3154042,7.18881429 31.1562792,8.35481429 C31.5790292,7.14638571 31.3549875,5.27795714 30.4794042,3.54781429 C29.2895292,1.19931429 27.3507375,-0.00597142857 26.1481958,0.856742857" id="Fill-4"></path> <path d="M30.2773708,9.65917857 C31.2812042,8.58039286 31.0634958,6.03939286 29.7920792,3.98239286 C28.5206625,1.92617857 26.6768708,1.13339286 25.6746208,2.21217857 C24.6707875,3.29096429 24.8877042,5.83196429 26.1591208,7.88896429 C27.4297458,9.94517857 29.2735375,10.7379643 30.2773708,9.65917857" id="Fill-6"></path> </g> </g> </g> </g> </g> </g> </svg> </div><div class="bg-white"> <div class="container"> <nav class="navbar navbar-default"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <a class="navbar-brand" href="/site/"> <img class="img-responsive" width="350" height="83" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMzUwcHgiIGhlaWdodD0iODJweCIgdmlld0JveD0iMCAwIDM1MCA4MiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDkuMiAoNTExNjApIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPHRpdGxlPkxvZ28gRklHPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTE2NzYwODExIDc4LjkxNTM4MzQgMC4xMTY3NjA4MTEgNzguOTE1MzgzNCA3OS4yOTk4ODI0IDAgNzkuMjk5ODgyNCI+PC9wb2x5Z29uPgogICAgICAgIDxwb2x5Z29uIGlkPSJwYXRoLTMiIHBvaW50cz0iMCA4Mi44ODMzNTE0IDM0OS4zMDY3MDkgODIuODgzMzUxNCAzNDkuMzA2NzA5IDEuMTIxNjIxNjIgMCAxLjEyMTYyMTYyIj48L3BvbHlnb24+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0iRGVzaWduLS0tRGVza3RvcCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkhvbWVwYWdlLS0tRGVza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OTYgNzQuMjUyMzYwOCAzNDkuMzA2MjYyIDc0LjI1MjM2MDggMzQ5LjMwNjI2MiA3OS42NjMwNjM1Ij48L3BvbHlnb24+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==" alt=""> </a> </div> <button type="button" class="navbar-toggle navbar-right hidden-md hidden-lg" data-target=".popmenu"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <!-- Collect the nav links, forms, and other content for toggling --> <ul class="nav navbar-nav navbar-right hidden-xs hidden-sm"> <li id="res_btn"><a href="/site/news/search.php">News</a></li> <li id="cal_btn" class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Calendar <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="/site/events/search.php?type=sport">Sport events</a></li> <li><a href="/site/events/search.php?type=judge">Judges' courses</a></li> <li><a href="/site/events/search.php?type=coach">Coaches' courses</a></li> <li><a href="/site/events/search.php?type=admin">Admin events</a></li> </ul> </li> <li id="res_btn"><a href="/site/events/searchresults.php">Results</a></li> <li id="disc_btn" class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Disciplines <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href=/site/discipline.php?disc=1>Gymnastics For All</a></li><li><a href=/site/discipline.php?disc=2>Men's Artistic Gymnastics</a></li><li><a href=/site/discipline.php?disc=3>Women's Artistic Gymnastics</a></li><li><a href=/site/discipline.php?disc=4>Rhythmic Gymnastics</a></li><li><a href=/site/discipline.php?disc=5>Trampoline Gymnastics</a></li><li><a href=/site/discipline.php?disc=10>Acrobatic Gymnastics</a></li><li><a href=/site/discipline.php?disc=9>Aerobic Gymnastics</a></li><li><a href=/site/discipline.php?disc=14>Parkour</a></li> </ul> </li> <!-- <li id="ath_btn"><a href="/site/athletes/bio_view.php">Athletes</a></li> --> <li id="cal_btn" class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Athletes <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="/site/athletes/lic_view.php">Licences</a></li> <li><a href="/site/athletes/bio_view.php">Biographies</a></li> <li><a href="/site/athletes/wcg_view.php">World Class Gymnasts</a></li> <li><a href="/site/pages/athletesCommission.php">Athletes' Commission</a></li> </ul> </li> <li id="jud_btn" class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Judging <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="/site/judges/jud_view.php">Judges</a></li> <li><a href="/site/pages/judges-support.php">Support Programme</a></li> <li><a href="/site/pages/judges-education.php">Education Programme</a></li> <!--<li><a target="_blank" href="http://fig-docs.com/judges/FIG_Online_Brevet_Judges_Tests_21Jan2021.pdf"><strong>2022 Judges' Tests</strong></a></li> <li><a target="_blank" href="http://fig-docs.com/judges/Retests_Schedule_15March2022.pdf">Judges' Retest Schedule</a></li> <li><a target="_blank" href="http://fig-docs.com/judges/Judges_Retest_Directives.pdf">Judges' Retest Directives</a></li>--> </ul> </li> <li id="edu_btn"><a href="/site/education.php">Education</a></li> <li id="rul_btn"><a href="/site/rules/">Rules</a></li> <li id="abo_btn"><a href="/site/about.php">About the FIG</a></li> <!--<li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About the FIG <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="/site/pages/about-president.php">The President</a></li> <li><a href="/site/pages/about-congress.php">Congress</a></li> <li><a href="/site/pages/about-ec.php">Executive Committee</a></li> <li><a href="/site/pages/council.php">Council</a></li> <li role="separator" class="divider"></li> <li><a href="/site/pages/council.php">Foundation Council</a></li> </ul> </li>--> </ul> </nav> </div> </div> <!-- ------------------------------------------- BANNER FOR COMPETITIONS -------------------------------------> <!-- <a href='https://live.gymnastics.sport/news.php?idevent=17824'> <div class="hidden-xs"> <div class="cta" style="padding: 10px 0 10px 30px; color: white; background-size: cover; background-image: url(https://live.gymnastics.sport/img/backgrounds/17824.jpg)"> <div class="hero__content"> <div class="profile"> <div class="current-event-box"> <span class="current-event-label">CURRENT EVENT</span> </div> <div class="profile__portrait" style="width: 120px; height: 120px; background-image: url(https://live.gymnastics.sport/img/logoevents/17824.png)"></div> <div class="profile__body" style="color:#FFF; text-shadow: 1px 1px 8px #000;"> <div style="color:#FFF; font-size:28px; text-shadow: 1px 1px 8px #000;" class="profile__discipline">2nd FIG Parkour World Championships</div> <div class="profile__discipline" style="color:#FFF; font-size:18px; text-shadow: 1px 1px 8px #000;">KITAKYUSHU (JPN)</div> <div class="profile__discipline">November 15 - 17, 2024</div> </div> <div class="news-teaser__btn"> <svg viewBox="0 0 100 100" width="100" height="100"><use xlink:href="#button_right_arrow"></use></svg> </div> </div> </div> </div> </div> --> <div class="visible-xs"> <div class="cta" style="color: white; background-size: cover; background-image: url(https://live.gymnastics.sport/img/backgrounds/17824.jpg)"> <div class="visible-xs" style="margin-top: -25px;z-index:3;position: relative;"> <div class="profile profile--column" style="text-align:center; color:#FFF; font-size:24px; text-shadow: 1px 1px 8px #000;"> <div style="text-align:center;" class="profile__name">2nd FIG Parkour World Championships</div> <div class="profile__discipline">KITAKYUSHU (JPN)</div> <div class="profile__discipline">November 15 - 17, 2024</div> <div class="news-teaser__btn"> <svg viewBox="0 0 100 100" width="100" height="100"><use xlink:href="#button_right_arrow"></use></svg> </div> </div> </div> </div> </div> </a><!-- ------------------------------------------------------------------------------------------------------ --> <!-- END OF INSERT ON EVERY PAGES --> <a name="_top"></a> <div class="hero hero--inverse hero--smaller no-print" style="background-image: url(../images/backgrounds/news.png)"> <div class="container"> <h1 class="hero__title">News</h1> </div> </div> <div class="col-lg-12"> <h4>&nbsp;</h4> </div> <div class="container"> <div id="newsdisplay" data-event="3160" v-cloak> <div class="row" v-if="publication"> <!-- colonne de gauche --> <div class="col-md-8"> <div class="page"> <div class="row"> <div class="col-md-12"> <div id="share-buttons" class="no-print"> <!-- Print --> <a href="javascript:;" onclick="window.print()"> <svg viewBox="0 0 23.7 18.9" width="19" height="19" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 18H6.2C5.0799 18 4.51984 18 4.09202 17.782C3.71569 17.5903 3.40973 17.2843 3.21799 16.908C3 16.4802 3 15.9201 3 14.8V10.2C3 9.0799 3 8.51984 3.21799 8.09202C3.40973 7.71569 3.71569 7.40973 4.09202 7.21799C4.51984 7 5.0799 7 6.2 7H7M17 18H17.8C18.9201 18 19.4802 18 19.908 17.782C20.2843 17.5903 20.5903 17.2843 20.782 16.908C21 16.4802 21 15.9201 21 14.8V10.2C21 9.07989 21 8.51984 20.782 8.09202C20.5903 7.71569 20.2843 7.40973 19.908 7.21799C19.4802 7 18.9201 7 17.8 7H17M7 11H7.01M17 7V5.4V4.6C17 4.03995 17 3.75992 16.891 3.54601C16.7951 3.35785 16.6422 3.20487 16.454 3.10899C16.2401 3 15.9601 3 15.4 3H8.6C8.03995 3 7.75992 3 7.54601 3.10899C7.35785 3.20487 7.20487 3.35785 7.10899 3.54601C7 3.75992 7 4.03995 7 4.6V5.4V7M17 7H7M8.6 21H15.4C15.9601 21 16.2401 21 16.454 20.891C16.6422 20.7951 16.7951 20.6422 16.891 20.454C17 20.2401 17 19.9601 17 19.4V16.6C17 16.0399 17 15.7599 16.891 15.546C16.7951 15.3578 16.6422 15.2049 16.454 15.109C16.2401 15 15.9601 15 15.4 15H8.6C8.03995 15 7.75992 15 7.54601 15.109C7.35785 15.2049 7.20487 15.3578 7.10899 15.546C7 15.7599 7 16.0399 7 16.6V19.4C7 19.9601 7 20.2401 7.10899 20.454C7.20487 20.6422 7.35785 20.7951 7.54601 20.891C7.75992 21 8.03995 21 8.6 21Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </a> <!-- Email --> <a href="mailto:?Subject=Averina sisters dominate as World Cup Series concludes in Pesaro&amp;Body=Check%20out%20this%20news%20from%20FIG%20website https://gymnastics.sport/site/news/displaynews.php?urlNews=3160"> <svg height="19px" width="19px" version="1.1" id="x32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve"> <style type="text/css"> .st0{fill:#000000;} </style> <g> <path class="st0" d="M510.678,112.275c-2.308-11.626-7.463-22.265-14.662-31.054c-1.518-1.915-3.104-3.63-4.823-5.345 c-12.755-12.818-30.657-20.814-50.214-20.814H71.021c-19.557,0-37.395,7.996-50.21,20.814c-1.715,1.715-3.301,3.43-4.823,5.345 C8.785,90.009,3.63,100.649,1.386,112.275C0.464,116.762,0,121.399,0,126.087V385.92c0,9.968,2.114,19.55,5.884,28.203 c3.497,8.26,8.653,15.734,14.926,22.001c1.59,1.586,3.169,3.044,4.892,4.494c12.286,10.175,28.145,16.32,45.319,16.32h369.958 c17.18,0,33.108-6.145,45.323-16.384c1.718-1.386,3.305-2.844,4.891-4.43c6.27-6.267,11.425-13.741,14.994-22.001v-0.064 c3.769-8.653,5.812-18.171,5.812-28.138V126.087C512,121.399,511.543,116.762,510.678,112.275z M46.509,101.571 c6.345-6.338,14.866-10.175,24.512-10.175h369.958c9.646,0,18.242,3.837,24.512,10.175c1.122,1.129,2.179,2.387,3.112,3.637 L274.696,274.203c-5.348,4.687-11.954,7.002-18.696,7.002c-6.674,0-13.276-2.315-18.695-7.002L43.472,105.136 C44.33,103.886,45.387,102.7,46.509,101.571z M36.334,385.92V142.735L176.658,265.15L36.405,387.435 C36.334,386.971,36.334,386.449,36.334,385.92z M440.979,420.597H71.021c-6.281,0-12.158-1.651-17.174-4.552l147.978-128.959 l13.815,12.018c11.561,10.046,26.028,15.134,40.36,15.134c14.406,0,28.872-5.088,40.432-15.134l13.808-12.018l147.92,128.959 C453.137,418.946,447.26,420.597,440.979,420.597z M475.666,385.92c0,0.529,0,1.051-0.068,1.515L335.346,265.221L475.666,142.8 V385.92z"/> </g> </svg> </a> <!-- Facebook --> <a href="http://www.facebook.com/sharer.php?u=https://gymnastics.sport/site/news/displaynews.php?urlNews=3160" target="_blank"> <svg viewBox="0 0 19 19" width="19" height="19"><use xlink:href="#icon_facebook"></use></svg> </a> <!-- LinkedIn --> <a href="https://www.linkedin.com/sharing/share-offsite/?url=https://gymnastics.sport/site/news/displaynews.php?urlNews=3160" target="_blank"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_linkedin"></use></svg> </a> <!-- Twitter --> <a href="https://twitter.com/share?url=https://gymnastics.sport/site/news/displaynews.php?urlNews=3160&amp;text=Averina sisters dominate as World Cup Series concludes in Pesaro&amp;hashtags=FIGNews" target="_blank"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_x"></use></svg> </a> <!-- VK --> <!-- <a href="http://vkontakte.ru/share.php?url=https://simplesharebuttons.com" target="_blank"> <img src="https://simplesharebuttons.com/images/somacro/vk.png" alt="VK" /> --> </a> </div> </div> </div> <br> <div class="row"> <div class="col-md-3 hidden-md"> <img class="img-responsive-news hidden-xs" v-bind:src="'../images/news/'+publication.id"> </div> <div class="col-md-9"> <div style="max-width:300px; max-height:25px; margin-bottom:10px;" class="btn btn-primary" v-if="publication.press_release == true" disabled>PRESS RELEASE</div> <h1>{{publication.title}}</h1> <span><strong>{{publication.publication | toReadableDate}}&nbsp;&nbsp;&nbsp;&nbsp;<kbd style="background-color:#868686"><i class="far fa-clock"></i>&nbsp;{{publication.read}}&nbsp;MIN</kbd></strong></span><br> </div> </div> <br> <div class="row"> <div class="col-md-12"> <div v-html="publication.content"> </div> </div> </div> </div> </div> <!-- colonne de droite --> <div class="col-md-4"> <!-- Related Gymnasts --> <div class="panel panel-default no-print" v-if="publication.gymnasts && publication.gymnasts.length > 0"> <div class="panel-heading"> <h3 class="panel-title">Related Athletes</h3> </div> <ul class="list-group"> <li class="list-group-item" v-for="gymnast in orderedAthletes"> <div class="media"> <div class="media-left"> <a target="_blank" v-bind:href="'../athletes/bio_detail.php?id='+gymnast.id"> <img width="80px" class="media-object" v-bind:src="'https://www.gymnastics.sport/asset.php?id=bpic_'+gymnast.id"> </a> </div> <div class="media-body space-between-v"> <h4 class="media-heading">{{gymnast.lastname}} <small>{{gymnast.firstname}}</small></h4> <!-- RUS sanction flags not displayed --> <!-- <img style="margin-top:22px; border: 1px solid #d7d7d7;" v-bind:src="'../../_asset/flags/'+gymnast.federation+'.png'"> --> </div> </div> </li> </ul> </div> <!-- Related keywords --> <div class="panel panel-default no-print" v-if="publication.keywords && publication.keywords.length > 0"> <div class="panel-heading"> <h3 class="panel-title">Related Keywords</h3> </div> <div class="panel-body label-list"> <a class="label label-default" v-for="keyword in publication.keywords" v-on:click="show_news_keyword(keyword.id, keyword.value)">{{keyword.value}}</a> </div> </div> <!-- Related disciplines --> <div class="panel panel-default no-print" v-if="publication.relateddisciplines && publication.relateddisciplines.length > 0"> <div class="panel-heading"> <h3 class="panel-title">Related Disciplines</h3> </div> <ul class="list-group"> <li class="list-group-item" v-for="relateddiscipline in publication.relateddisciplines"> <a v-bind:href="'/site/discipline.php?disc='+relateddiscipline.id" > <div class="media"> <div class="media-left"> <div class="media-object-centered"> <img class="media-object" width="57px" height="47px" src="../images/icon_sport_mag.svg " v-bind:src="'../images/icon_sport_'+relateddiscipline.code.toLowerCase()+'_color.svg'" /> </div> </div> <div class="media-body"> {{relateddiscipline.name}} </div> </div> </a> </li> </ul> </div> </div> <!-- Related events --> <div class="col-md-12 no-print"> <div class="panel panel-default" v-if="publication.events && publication.events.length > 0"> <div class="panel-heading"> <h3 class="panel-title">Related Event<span v-if="publication.events.length > 1">s</span></h3> </div> <div class="panel-body"> <table class="table"> <thead> <tr> <th class="hidden-xs">Dates</th> <th>Title</th> <th>City</th> <th class="hidden-xs">Discipline(s)</span></th> <th></th> <th></th> </tr> </thead> <tbody> <tr v-for="event in publication.events"> <td style="white-space: nowrap;" v-if="event.status != 'approved'">{{ event.status }}</td> <td style="white-space: nowrap;" v-else>{{ event.startevent | toReadableDate }} - {{ event.endevent | toReadableDate }}</td> <!-- <td class="hidden-xs">{{ event.startevent | toReadableDate }} - {{ event.endevent | toReadableDate }}</td> --> <td>{{ event.title }}</td> <td>{{ event.city.name }} ({{ event.city.country.code }})</td> <td class="hidden-xs"><span>{{event.disciplines.map(function(discipline) { return discipline.code; }).join(', ')}}</span></td> <td class="text-right" style="white-space: nowrap;"> <span style="white-space: nowrap;" v-if="event.hasresults"><a v-bind:href="'../events/results.php?idEvent=' + event.id"><i class="fa fa-trophy" aria-hidden="true"></i></a>&nbsp; &nbsp;</span> <span v-if="event.minisiteUrl" ><a target="_blank" v-bind:href="event.minisiteUrl"><i style="color:#ff684e;" class="fa fa-star" aria-hidden="true"></i></a>&nbsp;</span> <a v-bind:href="'../events/detail.php?id='+event.id"><i class="fa fa-search" aria-hidden="true"></i></a> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> <div class="modal fade" id="newsKeyword"> <div class="modal-dialog modal-lg"> <div class="modal-content"> </div> </div> </div> <script language='javascript'> window.onload = function() { $('img').bind('contextmenu', function(e) { return false; }); $('img').ondragstart = function () { return false; }; }; function show_news_keyword(id, text) { $.ajax({ type: "GET", url: "news_ajax.php", data: "id="+id+"&text="+text, success:function(data) { var modalid = $('#newsKeyword'); var modalbody = $('#newsKeyword .modal-content'); modalbody.html(data); modalid.modal('show'); } }); } </script> <footer class='footer no-print'><div class='footer__line'><center><img width='80%' class='img-responsive' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABoCAYAAADfCaYMAAABd2lDQ1BIRCA3MDktQQAAKM+t0TFLw0AUB/B/a7VKC4qIdhA5UMQhkVqH2uqStmArDqUqqFuapq2QtCG5Uv0Abi46iC6K+hVEFwdHcdBBEITiZxAKBZES75Ihi+jig4TfPR7vHvcAP5UNQwsA0GvULCynyObWNgm2EEIYw0hiTFYsQ8rnV/Fz+IDOK/8DLyLvVc59vi3tN8+v+1ZOJ5JUwO8RKqm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U0CkoysMQApDfcmIW2ujlVZaaaX5arxNu7jWE0OHLY3it1gdT5ha4064K22tBY1WWmmllacGgOgAZZWT2CNuKUw9MCTmMuTAtNoCRiuttNJKPfn/iZ9X/3+5SNAAAAAASUVORK5CYII=' alt=''></center></div><div class="footer__links"><a href="/site/about.php#google-maps" class="footer__item">Contact us</a><a href="/site/pages/privacy.php" class="footer__item">Privacy Notice</a><!-- <a href="#" target="_blank" class="footer__item">Subscribe to newsletter</a> --><a href="/site/opportunities/jobs.php" class="footer__item">Job opportunities</a> <!-- <a href="https://administration.gymnastics.sport/" target="_blank" class="footer__item">FIG Administration</a> --> <!-- <a href="https://database.gymnastics.sport/" target="_blank" class="footer__item">Sport Database</a> --> <a href="https://www.web-sts.com/" target="_blank" class="footer__item">Sports Training Systems</a> <a href="https://www.fig-photos.com" target="_blank" class="footer__item">Photos</a> <!--<a href="https://ircos.gymnastics.sport/" target="_blank" class="footer__item">IRCOS</a>--> </div> <div class="hidden-print footer__social"> <a href="https://www.facebook.com/fig.gymnastics" target="_blank" class="footer__icon hidden-print"> <svg viewBox="0 0 19 19" width="19" height="19"><use xlink:href="#icon_facebook"></use></svg> </a> <a href="https://twitter.com/gymnastics" target="_blank" class="footer__icon hidden-print"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_x"></use></svg> </a> <a href="http://www.youtube.com/user/figchannel" target="_blank" class="footer__icon hidden-print"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_youtube"></use></svg> </a> <a href="https://www.linkedin.com/company/f%C3%A9d%C3%A9ration-internationale-de-gymnastique" target="_blank" class="footer__icon hidden-print"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_linkedin"></use></svg> </a> <a href="https://instagram.com/figymnastics" target="_blank" class="footer__icon hidden-print"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_instagram"></use></svg> </a> <a href="https://www.tiktok.com/@figymnastics" target="_blank" class="footer__icon hidden-print"> <svg viewBox="0 0 23.7 18.9" width="24" height="19"><use xlink:href="#icon_tiktok"></use></svg> </a> <a href="https://allgymnastics.tv/" target="_blank" class="footer__icon hidden-print" style="position: relative; left: -8px;"> <svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="34" height="27" viewBox="0 0 1666.000000 1632.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,1632.000000) scale(0.100000,-0.100000)" fill="#fff" stroke="none"> <path d="M7855 14063 c-395 -25 -794 -133 -1140 -307 -336 -170 -612 -391-838 -671 l-80 -100 1131 -3 c623 -1 1641 -1 2263 0 l1130 3 -84 105 c-107 134 -296 316 -434 419 -535 399 -1240 600 -1948 554z"/> <path d="M7855 12283 c-395 -25 -794 -133 -1140 -307 -336 -170 -612 -391 -838 -671 l-80 -100 1131 -3 c623 -1 1641 -1 2263 0 l1130 3 -84 105 c-173 216 -414 423 -671 576 -488 292 -1108 436 -1711 397z"/> <path d="M11010 9987 l0 -534 26 -24 c49 -46 162 -184 217 -267 198 -296 297 -629 297 -997 0 -436 -139 -825 -412 -1150 -41 -49 -87 -101 -102 -114 l-26 -24 0 -539 c0 -296 2 -538 4 -538 2 0 53 20 112 45 548 230 983 639 1245 1170 131 267 219 577 250 878 17 177 7 549 -20 706 -130 755 -539 1358 -1175 1730 -109 63 -324 165 -393 186 l-23 6 0 -534z"/> <path d="M8020 10504 c-298 -34 -474 -74 -698 -160 -653 -251 -1171 -780 -1394 -1424 -133 -381 -164 -813 -87 -1195 94 -465 315 -874 655 -1207 132 -130 211 -194 369 -300 311 -207 710 -348 1104 -389 144 -15 479 -6 621 16 248 39 474 112 715 230 402 196 734 495 972 874 l53 84 0 1132 0 1131 -71 110 c-382 587 -978 968 -1689 1079 -99 15 -469 28 -550 19z m438 -993 c123 -24 229 -60 335 -112 401 -200 669 -568 743 -1019 21 -128 14 -399 -15 -520 -124 -536 -540 -943 -1069 -1047 -130 -25 -367 -23 -499 6 -306 64 -580 231 -769 465 -469 582 -403 1427 152 1917 80 70 201 153 292 198 85 43 250 97 348 115 120 22 362 20 482 -3z"/> <path d="M3234 10349 c-541 -430 -884 -1085 -975 -1864 -16 -133 -16 -502 0 -645 62 -563 265 -1070 592 -1481 121 -152 371 -390 462 -440 16 -9 17 101 17 2246 0 1240 -1 2255 -3 2255 -2 0 -44 -32 -93 -71z"/> <path d="M5005 10343 c-117 -94 -295 -274 -385 -388 -648 -818 -784 -2030 -339 -3026 125 -282 308 -550 523 -765 101 -100 293 -261 301 -252 3 3 4 1019 3 2258 l-3 2253 -100 -80z"/> <path d="M13320 8165 c0 -1240 3 -2255 8 -2255 15 0 179 136 271 224 348 337 599 785 727 1301 66 268 78 382 78 730 0 348 -12 462 -78 730 -150 603 -470 1116 -911 1461 -46 35 -86 64 -89 64 -3 0 -6 -1015 -6 -2255z"/> <path d="M5812 5111 c9 -25 143 -185 228 -271 545 -553 1346 -846 2189 -800 608 33 1145 225 1604 572 112 85 313 283 408 401 44 54 79 100 79 103 0 2 -1015 4 -2256 4 -1388 0 -2254 -4 -2252 -9z"/> <path d="M5826 3303 c291 -391 725 -704 1212 -877 339 -119 639 -169 1022 -169 500 0 900 90 1325 298 359 176 678 438 909 748 l28 37 -2262 0 -2262 0 28 -37z"/> </g> </svg> </a> </div> </footer> <!-- Masonry --> <script src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.1/masonry.pkgd.js"></script> <script src="https://unpkg.com/vue-masonry@0.11.3/dist/vue-masonry-plugin-window.js"></script> <script> jQuery('.grid').masonry({ columnWidth: '.grid-sizer', itemSelector: '.grid-item', percentPosition: true, }); var VueMasonryPlugin = window["vue-masonry-plugin"].VueMasonryPlugin Vue.use(VueMasonryPlugin) </script> <!-- Responsive menu --> <div class="popmenu hidden-lg"> <ul> <li><a href="/site/news/search.php">News</a></li> <li> <a href="#" class="popmenu__parent">Calendar</a> <div class="popmenu__submenu"> <ul> <li><a href="/site/events/search.php?type=sport">Sport events</a></li> <li><a href="/site/events/search.php?type=judge">Judge courses</a></li> <li><a href="/site/events/search.php?type=coach">Coach courses</a></li> <li><a href="/site/events/search.php?type=admin">Admin events</a></li> </ul> </div> </li> <li><a href="/site/events/searchresults.php">Results</a></li> <li> <a href="#" class="popmenu__parent">Disciplines</a> <div class="popmenu__submenu"> <ul> <li style='font-size:25px;'><a href='/site/discipline.php?disc=1'>Gymnastics For All</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=2'>Men's Artistic Gymnastics</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=3'>Women's Artistic Gymnastics</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=4'>Rhythmic Gymnastics</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=5'>Trampoline Gymnastics</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=10'>Acrobatic Gymnastics</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=9'>Aerobic Gymnastics</a></li><li style='font-size:25px;'><a href='/site/discipline.php?disc=14'>Parkour</a></li> </ul> </div> </li> <li> <a href="#" class="popmenu__parent">Athletes</a> <div class="popmenu__submenu"> <ul> <li><a href="/site/athletes/lic_view.php">Licences</a></li> <li><a href="/site/athletes/bio_view.php">Biographies</a></li> <li><a href="/site/athletes/wcg_view.php">World Class Gymnasts</a></li> <li><a href="/site/pages/athletesCommission.php">Athletes’ Commission</a></li> </ul> </div> </li> <li> <a href="#" class="popmenu__parent">Judging</a> <div class="popmenu__submenu"> <ul> <li><a href="/site/judges/jud_view.php">Judges</a></li> <li><a href="/site/pages/judges-support.php">Support Program</a></li> <li><a href="/site/pages/judges-education.php">Education Programme</a></li> <li><a target="_blank" href="http://fig-docs.com/judges/FIG_Online_Brevet_Judges_Tests_21Jan2021.pdf"><strong>2022 Judges' Tests</strong></a></li> <li><a target="_blank" href="http://fig-docs.com/judges/TRA_Official_Communication_16Feb2022_V2.pdf">-> TRA test Time Changes</a></li> </ul> </div> </li> <li><a href="/site/education.php">Education</a></li> <li id="rul_btn"><a href="/site/about.php">About the FIG</a></li> <li> <a href="#" class="popmenu__parent">More</a> <div class="popmenu__submenu"> <ul> <li><a href="/site/rules/">Rules</a></li> <li><a href="/site/governance.php">Governance</a></li> <li><a href="/site/pages/antidoping-about.php">Anti-doping</a></li> <li><a href="/site/pages/medical-articles.php">Medical</a></li> <li><a href="/site/pages/safeguarding.php">Safeguarding</a></li> <li><a href="/site/apparatus/man_view.php">Apparatus</a></li> <li><a href="/site/media.php">Media</a></li> </ul> </div> </li> </ul> </div> <script>window.jQuery || document.write('<script src="../assets/js/vendor/jquery.min.js"><\/script>')</script> <script src="/site/js/bootstrap.js"></script> <script> var popmenu = Popmenu('.popmenu'); popmenu.init(); $('.js-slider').slick({ dots: true, infinite: true, speed: 500, fade: true, cssEase: 'linear', autoplay: true, autoplaySpeed: 8000, }); $('.js-slider-atg').slick({ dots: true, infinite: true, speed: 500, fade: true, cssEase: 'linear', autoplay: true, autoplaySpeed: 8000 }); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10