{"id":425801,"date":"2024-07-09T15:04:46","date_gmt":"2024-07-09T15:04:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=425801"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=425801","title":{"rendered":"<span>\u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 JavaScript<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043c\u043e\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <a href=\"https:\/\/www.bennadel.com\/blog\/4668-color-palette-utility-in-apline-js.htm\" rel=\"noopener noreferrer nofollow\">\u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b \u0432 Alpine.js<\/a> \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u043e\u043b\u044c: \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 Hue <code>(0..360)<\/code>, Saturation <code>(0..100)<\/code> \u0438 Lightness <code>(0..100)<\/code>. \u041a\u043e\u0433\u0434\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u044d\u0442\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Crypto_API\" rel=\"noopener noreferrer nofollow\">Web Crypto API<\/a>. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043c\u0435\u0442\u043e\u0434 <code>Math.random()<\/code>, \u043d\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 MDN \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <code>Crypto.getRandomValues()<\/code> \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0435\u043d. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <code>Crypto<\/code> (\u0441 \u0444\u043e\u043b\u043b\u0431\u044d\u043a\u043e\u043c \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c <code>Math<\/code> \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438). \u041d\u043e \u044d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 &#171;\u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439&#187; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 &#171;\u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439&#187; \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><a href=\"https:\/\/bennadel.github.io\/JavaScript-Demos\/demos\/web-crypto-rand\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 JavaScript Demos \u043d\u0430 GitHub<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/bennadel\/JavaScript-Demos\/tree\/master\/demos\/web-crypto-rand\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 JavaScript Demos \u043d\u0430 GitHub<\/a>.<\/p>\n<p>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042f \u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u0413\u041f\u0421\u0427) \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f &#171;\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c&#187; \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u0442 \u0438\u043b\u0438 \u0443\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0430 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u043c.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e &#171;\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432&#187;, \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a \u043c\u043e\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b, \u043f\u043e\u043d\u044f\u0442\u0438\u0435 &#171;\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438&#187; \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u043b\u044b\u0432\u0447\u0430\u0442\u043e. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u00ab\u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 (UX).<\/p>\n<p>\u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 <em>\u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445<\/em> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u0430\u043a <code>Math.random()<\/code>, \u0442\u0430\u043a \u0438 <code>crypto.getRandomValues()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e <em>\u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f\u043c<\/em>. \u041a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;canvas><\/code> \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0417\u0430\u0442\u0435\u043c \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u0432\u043e\u0435\u0439 (\u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0439) \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0442\u0443\u0438\u0446\u0438\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 &#171;\u043b\u0443\u0447\u0448\u0435&#187; \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>Math.random()<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 <code>0<\/code> (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e <code>1<\/code> (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432\u0437\u044f\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 <code>Math.random()<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 <code>0.25<\/code>, \u0432\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a 25% \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430-\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430. \u0410 \u0435\u0441\u043b\u0438 <code>Math.random()<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 <code>0.97<\/code>, \u0432\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a 97% \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430-\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>crypto.getRandomValues()<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u043c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/TypedArray\" rel=\"noopener noreferrer nofollow\">TypedArray<\/a> \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c (\u0434\u043b\u0438\u043d\u043e\u0439). \u0417\u0430\u0442\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>.getRandomValues()<\/code> \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c\/\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u044d\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u044f \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0438 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u0430\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c <code>value<\/code>, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 <code>.getRandomValues()<\/code>, \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (<code>0..1<\/code>):<\/p>\n<p><code>value \/ ( maxValue + 1 )<\/code><\/p>\n<p>\u042f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044e \u044d\u0442\u0443 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, <code>randFloatWithMath()<\/code> \u0438 <code>randFloatWithCrypto()<\/code>:<\/p>\n<pre><code class=\"javascript\">\/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Math \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithMath() {  return Math.random();  }  \/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Crypto \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithCrypto() {  var [ randomInt ] = crypto.getRandomValues( new Uint32Array( 1 ) ); var maxInt = 4294967295;  return ( randomInt \/ ( maxInt + 1 ) );  }<\/code><\/pre>\n<p>\u0418\u043c\u0435\u044f \u044d\u0442\u0438 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, \u044f \u043c\u043e\u0433\u0443 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>randFloat()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">\/** * \u042f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 min \u0438 max, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. *\/ function randRange( min, max ) {  return ( min + Math.floor( randFloat() * ( max - min + 1 ) ) );  }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 <a href=\"https:\/\/alpinejs.dev\/\" rel=\"noopener noreferrer nofollow\">Alpine.js<\/a>. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Alpine.js, \u043d\u043e \u0435\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <code>randFloat()<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"xml\">&lt;!doctype html> &lt;html lang=\"en\"> &lt;head> &lt;meta charset=\"utf-8\" \/> &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/> &lt;link rel=\"stylesheet\" type=\"text\/css\" href=\".\/main.css\" \/> &lt;\/head> &lt;body>  &lt;h1> &lt;!-- \u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 JavaScript --> Exploring Randomness In JavaScript &lt;\/h1>  &lt;div class=\"side-by-side\"> &lt;section x-data=\"Explore( 'math' )\"> &lt;h2> &lt;!-- \u041c\u043e\u0434\u0443\u043b\u044c Math --> Math Module &lt;\/h2>  &lt;!-- \u041e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 {X,Y}. --> &lt;canvas x-ref=\"canvas\" width=\"320\" height=\"320\"> &lt;\/canvas>  &lt;!-- \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. --> &lt;p x-ref=\"list\">&lt;\/p>  &lt;p> &lt;!-- \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c --> Duration: &lt;span x-text=\"duration\">&lt;\/span> &lt;\/p> &lt;\/section>  &lt;section x-data=\"Explore( 'crypto' )\"> &lt;h2> &lt;!-- \u041c\u043e\u0434\u0443\u043b\u044c Crypto --> Crypto Module &lt;\/h2>  &lt;!-- \u041e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 {X,Y}. --> &lt;canvas x-ref=\"canvas\" width=\"320\" height=\"320\"> &lt;\/canvas>  &lt;!-- \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. --> &lt;p x-ref=\"list\">&lt;\/p>  &lt;p> &lt;!-- \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c --> Duration: &lt;span x-text=\"duration\">&lt;\/span>ms &lt;\/p> &lt;\/section> &lt;\/div>  &lt;script type=\"text\/javascript\" src=\".\/main.js\" defer>&lt;\/script> &lt;script type=\"text\/javascript\" src=\"..\/..\/vendor\/alpine\/3.13.5\/alpine.3.13.5.min.js\" defer>&lt;\/script>  &lt;\/body> &lt;\/html><\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>x-data=\"Explore\"<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 <code>x-ref<\/code>: <code>canvas<\/code> \u0438 <code>list<\/code>. \u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043e\u043d \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442 \u044d\u0442\u0438 \u0434\u0432\u0430 <code>x-ref<\/code> \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>fillCanvas()<\/code> \u0438 <code>fillList()<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0412\u043e\u0442 \u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 JavaScript \/ Alpine.js:<\/p>\n<pre><code class=\"javascript\">\/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Math \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithMath() {  return Math.random();  }  \/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Crypto \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithCrypto() {  \/\/ \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \/\/ \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432     \/\/ \u0434\u043b\u0438\u043d\u043e\u0439 1. \/\/ -- \/\/ \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \/\/ \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 (\u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0434\u0432\u043e\u0435). \u041d\u043e \u043c\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \/\/ \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. var [ randomInt ] = crypto.getRandomValues( new Uint32Array( 1 ) ); var maxInt = 4294967295;  \/\/ \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Math.random(), crypto \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043c \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \/\/ \u0432 \u0442\u043e \u0436\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435, \/\/ \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. return ( randomInt \/ ( maxInt + 1 ) );  }  \/\/ ----------------------------------------------------------------------------------- \/\/ \/\/ ----------------------------------------------------------------------------------- \/\/  function Explore( algorithm ) {  \/\/ \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 Alpine.js \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \/\/ \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 (0..1). \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \/\/ \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. var randFloat = ( algorithm === \"math\" ) ? randFloatWithMath : randFloatWithCrypto ;  return { duration: 0, \/\/ \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. init: init, \/\/ \u041f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. fillCanvas: fillCanvas, fillList: fillList, randRange: randRange }  \/\/ --- \/\/ \u041f\u0423\u0411\u041b\u0418\u0427\u041d\u042b\u0415 \u041c\u0415\u0422\u041e\u0414\u042b. \/\/ ---  \/** * \u042f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Alpine.js. *\/ function init() {  var startedAt = Date.now();  this.fillCanvas(); this.fillList();  this.duration = ( Date.now() - startedAt );  }  \/\/ --- \/\/ \u041f\u0420\u0418\u0412\u0410\u0422\u041d\u042b\u0415 \u041c\u0415\u0422\u041e\u0414\u042b. \/\/ ---  \/** * \u042f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e canvas \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u043c\u0438 {X,Y}. *\/ function fillCanvas() {  var pixelCount = 200000; var canvas = this.$refs.canvas; var width = canvas.width; var height = canvas.height;  var context = canvas.getContext( \"2d\" ); context.fillStyle = \"deeppink\";  for ( var i = 0 ; i &lt; pixelCount ; i++ ) {  var x = this.randRange( 0, width ); var y = this.randRange( 0, height );  \/\/ \u041f\u043e \u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u0445 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c. \/\/ \u042f \u043d\u0430\u0434\u0435\u044f\u043b\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.             context.globalAlpha = ( i \/ pixelCount ); context.fillRect( x, y, 1, 1 );  }  }  \/** * \u042f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0442 0 \u0434\u043e 9. *\/ function fillList() {  var list = this.$refs.list; var valueCount = 105; var values = [];  for ( var i = 0 ; i &lt; valueCount ; i++ ) {  values.push( this.randRange( 0, 9 ) );  }  list.textContent = values.join( \" \" );  }  \/** * \u042f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 min \u0438 max, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. *\/ function randRange( min, max ) {  return ( min + Math.floor( randFloat() * ( max - min + 1 ) ) );  }  }<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/809\/1b3\/74f\/8091b374f993b82a04e518413b2fe5ab.png\" width=\"1400\" height=\"1516\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/809\/1b3\/74f\/8091b374f993b82a04e518413b2fe5ab.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432\u044b\u0448\u0435, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043c\u044b\u0442\u0430. \u041e\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 <em>\u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f\u043c\u0438<\/em>, \u0447\u0435\u043c \u0441 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u044f\u0434\u0443 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f <em>\u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u044f\u0434, \u0440\u0430\u0432\u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u044f\u0434\u0443 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f <em>\u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u044f\u0434. \u041d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u044d\u0442\u043e <em>\u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f<\/em> \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0434\u0443\u043b\u044c <code>Crypto<\/code> \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e &#8212; \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u0434 TypedArray). \u041d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f &#171;\u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0439&#187; \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<p>\u0421\u043a\u0430\u0436\u0443 \u043b\u0438\u0448\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 <a href=\"https:\/\/www.bennadel.com\/blog\/4668-color-palette-utility-in-apline-js.htm\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b<\/a> \u043c\u043d\u0435, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <code>Crypto<\/code> &#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u043b\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <code>Math<\/code>. \u042d\u0442\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 <em>\u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f<\/em> \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <code>Crypto<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0435\u0439 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u0447\u0435\u0433\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c).<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/825986\/\"> https:\/\/habr.com\/ru\/articles\/825986\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043c\u043e\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <a href=\"https:\/\/www.bennadel.com\/blog\/4668-color-palette-utility-in-apline-js.htm\" rel=\"noopener noreferrer nofollow\">\u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b \u0432 Alpine.js<\/a> \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c \u0438\u0433\u0440\u0430\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u043e\u043b\u044c: \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 Hue <code>(0..360)<\/code>, Saturation <code>(0..100)<\/code> \u0438 Lightness <code>(0..100)<\/code>. \u041a\u043e\u0433\u0434\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u044d\u0442\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Crypto_API\" rel=\"noopener noreferrer nofollow\">Web Crypto API<\/a>. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043c\u0435\u0442\u043e\u0434 <code>Math.random()<\/code>, \u043d\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 MDN \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <code>Crypto.getRandomValues()<\/code> \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0435\u043d. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <code>Crypto<\/code> (\u0441 \u0444\u043e\u043b\u043b\u0431\u044d\u043a\u043e\u043c \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c <code>Math<\/code> \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438). \u041d\u043e \u044d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 &#171;\u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439&#187; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 &#171;\u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439&#187; \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><a href=\"https:\/\/bennadel.github.io\/JavaScript-Demos\/demos\/web-crypto-rand\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 JavaScript Demos \u043d\u0430 GitHub<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/bennadel\/JavaScript-Demos\/tree\/master\/demos\/web-crypto-rand\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 JavaScript Demos \u043d\u0430 GitHub<\/a>.<\/p>\n<p>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042f \u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u0413\u041f\u0421\u0427) \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f &#171;\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c&#187; \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u0442 \u0438\u043b\u0438 \u0443\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0430 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u043c.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e &#171;\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432&#187;, \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a \u043c\u043e\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b, \u043f\u043e\u043d\u044f\u0442\u0438\u0435 &#171;\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438&#187; \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u043b\u044b\u0432\u0447\u0430\u0442\u043e. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0446\u0432\u0435\u0442\u0430 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u00ab\u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 (UX).<\/p>\n<p>\u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 <em>\u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445<\/em> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u0430\u043a <code>Math.random()<\/code>, \u0442\u0430\u043a \u0438 <code>crypto.getRandomValues()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e <em>\u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f\u043c<\/em>. \u041a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;canvas><\/code> \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0417\u0430\u0442\u0435\u043c \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u0432\u043e\u0435\u0439 (\u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0439) \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0442\u0443\u0438\u0446\u0438\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 &#171;\u043b\u0443\u0447\u0448\u0435&#187; \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>Math.random()<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 <code>0<\/code> (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e <code>1<\/code> (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432\u0437\u044f\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 <code>Math.random()<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 <code>0.25<\/code>, \u0432\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a 25% \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430-\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430. \u0410 \u0435\u0441\u043b\u0438 <code>Math.random()<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 <code>0.97<\/code>, \u0432\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a 97% \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430-\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>crypto.getRandomValues()<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u043c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/TypedArray\" rel=\"noopener noreferrer nofollow\">TypedArray<\/a> \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c (\u0434\u043b\u0438\u043d\u043e\u0439). \u0417\u0430\u0442\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>.getRandomValues()<\/code> \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c\/\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u044d\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u044f \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0438 \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043a \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u0430\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c <code>value<\/code>, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 <code>.getRandomValues()<\/code>, \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (<code>0..1<\/code>):<\/p>\n<p><code>value \/ ( maxValue + 1 )<\/code><\/p>\n<p>\u042f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044e \u044d\u0442\u0443 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, <code>randFloatWithMath()<\/code> \u0438 <code>randFloatWithCrypto()<\/code>:<\/p>\n<pre><code class=\"javascript\">\/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Math \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithMath() {  return Math.random();  }  \/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Crypto \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithCrypto() {  var [ randomInt ] = crypto.getRandomValues( new Uint32Array( 1 ) ); var maxInt = 4294967295;  return ( randomInt \/ ( maxInt + 1 ) );  }<\/code><\/pre>\n<p>\u0418\u043c\u0435\u044f \u044d\u0442\u0438 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, \u044f \u043c\u043e\u0433\u0443 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>randFloat()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">\/** * \u042f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 min \u0438 max, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. *\/ function randRange( min, max ) {  return ( min + Math.floor( randFloat() * ( max - min + 1 ) ) );  }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 <a href=\"https:\/\/alpinejs.dev\/\" rel=\"noopener noreferrer nofollow\">Alpine.js<\/a>. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Alpine.js, \u043d\u043e \u0435\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <code>randFloat()<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"xml\">&lt;!doctype html> &lt;html lang=\"en\"> &lt;head> &lt;meta charset=\"utf-8\" \/> &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/> &lt;link rel=\"stylesheet\" type=\"text\/css\" href=\".\/main.css\" \/> &lt;\/head> &lt;body>  &lt;h1> &lt;!-- \u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 JavaScript --> Exploring Randomness In JavaScript &lt;\/h1>  &lt;div class=\"side-by-side\"> &lt;section x-data=\"Explore( 'math' )\"> &lt;h2> &lt;!-- \u041c\u043e\u0434\u0443\u043b\u044c Math --> Math Module &lt;\/h2>  &lt;!-- \u041e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 {X,Y}. --> &lt;canvas x-ref=\"canvas\" width=\"320\" height=\"320\"> &lt;\/canvas>  &lt;!-- \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. --> &lt;p x-ref=\"list\">&lt;\/p>  &lt;p> &lt;!-- \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c --> Duration: &lt;span x-text=\"duration\">&lt;\/span> &lt;\/p> &lt;\/section>  &lt;section x-data=\"Explore( 'crypto' )\"> &lt;h2> &lt;!-- \u041c\u043e\u0434\u0443\u043b\u044c Crypto --> Crypto Module &lt;\/h2>  &lt;!-- \u041e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 {X,Y}. --> &lt;canvas x-ref=\"canvas\" width=\"320\" height=\"320\"> &lt;\/canvas>  &lt;!-- \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. --> &lt;p x-ref=\"list\">&lt;\/p>  &lt;p> &lt;!-- \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c --> Duration: &lt;span x-text=\"duration\">&lt;\/span>ms &lt;\/p> &lt;\/section> &lt;\/div>  &lt;script type=\"text\/javascript\" src=\".\/main.js\" defer>&lt;\/script> &lt;script type=\"text\/javascript\" src=\"..\/..\/vendor\/alpine\/3.13.5\/alpine.3.13.5.min.js\" defer>&lt;\/script>  &lt;\/body> &lt;\/html><\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>x-data=\"Explore\"<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 <code>x-ref<\/code>: <code>canvas<\/code> \u0438 <code>list<\/code>. \u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043e\u043d \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442 \u044d\u0442\u0438 \u0434\u0432\u0430 <code>x-ref<\/code> \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>fillCanvas()<\/code> \u0438 <code>fillList()<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0412\u043e\u0442 \u043c\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 JavaScript \/ Alpine.js:<\/p>\n<pre><code class=\"javascript\">\/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Math \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithMath() {  return Math.random();  }  \/** * \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f Crypto \u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u043e 1 (\u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e). *\/ function randFloatWithCrypto() {  \/\/ \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \/\/ \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432     \/\/ \u0434\u043b\u0438\u043d\u043e\u0439 1. \/\/ -- \/\/ \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \/\/ \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 (\u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0434\u0432\u043e\u0435). \u041d\u043e \u043c\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \/\/ \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. var [ randomInt ] = crypto.getRandomValues( new Uint32Array( 1 ) ); var maxInt = 4294967295;  \/\/ \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Math.random(), crypto \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043c \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \/\/ \u0432 \u0442\u043e \u0436\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0435, \/\/ \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. return ( randomInt \/ ( maxInt + 1 ) );  }  \/\/ ----------------------------------------------------------------------------------- \/\/ \/\/ ----------------------------------------------------------------------------------- \/\/  function Explore( algorithm ) {  \/\/ \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 Alpine.js \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \/\/ \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 (0..1). \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \/\/ \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. var randFloat = ( algorithm === \"math\" ) ? randFloatWithMath : randFloatWithCrypto ;  return { duration: 0, \/\/ \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. init: init, \/\/ \u041f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. fillCanvas: fillCanvas, fillList: fillList, randRange: randRange }  \/\/ --- \/\/ \u041f\u0423\u0411\u041b\u0418\u0427\u041d\u042b\u0415 \u041c\u0415\u0422\u041e\u0414\u042b. \/\/ ---  \/** * \u042f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Alpine.js. *\/ function init() {  var startedAt = Date.now();  this.fillCanvas(); this.fillList();  this.duration = ( Date.now() - startedAt );  }  \/\/ --- \/\/ \u041f\u0420\u0418\u0412\u0410\u0422\u041d\u042b\u0415 \u041c\u0415\u0422\u041e\u0414\u042b. \/\/ ---  \/** * \u042f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e canvas \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u043c\u0438 {X,Y}. *\/ function fillCanvas() {  var pixelCount = 200000; var canvas = this.$refs.canvas; var width = canvas.width; var height = canvas.height;  var context = canvas.getContext( \"2d\" ); context.fillStyle = \"deeppink\";  for ( var i = 0 ; i &lt; pixelCount ; i++ ) {  var x = this.randRange( 0, width ); var y = this.randRange( 0, height );  \/\/ \u041f\u043e \u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u0445 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c. \/\/ \u042f \u043d\u0430\u0434\u0435\u044f\u043b\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.             context.globalAlpha = ( i \/ pixelCount ); context.fillRect( x, y, 1, 1 );  }  }  \/** * \u042f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0442 0 \u0434\u043e 9. *\/ function fillList() {  var list = this.$refs.list; var valueCount = 105; var values = [];  for ( var i = 0 ; i &lt; valueCount ; i++ ) {  values.push( this.randRange( 0, 9 ) );  }  list.textContent = values.join( \" \" );  }  \/** * \u042f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 min \u0438 max, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. *\/ function randRange( min, max ) {  return ( min + Math.floor( randFloat() * ( max - min + 1 ) ) );  }  }<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432\u044b\u0448\u0435, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043c\u044b\u0442\u0430. \u041e\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 <em>\u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f\u043c\u0438<\/em>, \u0447\u0435\u043c \u0441 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u044f\u0434\u0443 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f <em>\u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u044f\u0434, \u0440\u0430\u0432\u043d\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u044f\u0434\u0443 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f <em>\u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445<\/em> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u044f\u0434. \u041d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u044d\u0442\u043e <em>\u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f<\/em> \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0434\u0443\u043b\u044c <code>Crypto<\/code> \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e &#8212; \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u0434 TypedArray). \u041d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f &#171;\u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0439&#187; \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<p>\u0421\u043a\u0430\u0436\u0443 \u043b\u0438\u0448\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 <a href=\"https:\/\/www.bennadel.com\/blog\/4668-color-palette-utility-in-apline-js.htm\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b<\/a> \u043c\u043d\u0435, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <code>Crypto<\/code> &#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u043b\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <code>Math<\/code>. \u042d\u0442\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 <em>\u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f<\/em> \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <code>Crypto<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-425801","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/425801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=425801"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/425801\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=425801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=425801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=425801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}