diff --git a/064d4f6f.e26fa39d.js b/064d4f6f.a9c51815.js similarity index 98% rename from 064d4f6f.e26fa39d.js rename to 064d4f6f.a9c51815.js index d6e5990e2..b2d1d0d5a 100644 --- a/064d4f6f.e26fa39d.js +++ b/064d4f6f.a9c51815.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{64:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return o})),a.d(t,"metadata",(function(){return s})),a.d(t,"toc",(function(){return l})),a.d(t,"default",(function(){return p}));var n=a(3),i=a(7),r=(a(0),a(98)),o={id:"home-assistant",title:"Integration with Home Assistant",sidebar_label:"Home Assistant"},s={unversionedId:"usage/home-assistant",id:"usage/home-assistant",isDocsHomePage:!1,title:"Integration with Home Assistant",description:"The best way to integrate with HomeAssistant is to use the official integration. When configuring the integration, you will be asked for the Host of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like http5000/. If you are using HassOS with the addon, the host should be http5000 (or http5000 if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant:",source:"@site/docs/usage/home-assistant.md",slug:"/usage/home-assistant",permalink:"/frigate/usage/home-assistant",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/home-assistant.md",version:"current",sidebar_label:"Home Assistant",sidebar:"docs",previous:{title:"Advanced",permalink:"/frigate/configuration/advanced"},next:{title:"Web Interface",permalink:"/frigate/usage/web"}},l=[{value:"Sensors:",id:"sensors",children:[]},{value:"Cameras:",id:"cameras",children:[]},{value:"Media Browser:",id:"media-browser",children:[]},{value:"API:",id:"api",children:[{value:"Notifications",id:"notifications",children:[]}]}],c={toc:l};function p(e){var t=e.components,a=Object(i.a)(e,["components"]);return Object(r.b)("wrapper",Object(n.a)({},c,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"The best way to integrate with HomeAssistant is to use the ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate-hass-integration"}),"official integration"),". When configuring the integration, you will be asked for the ",Object(r.b)("inlineCode",{parentName:"p"},"Host")," of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like ",Object(r.b)("inlineCode",{parentName:"p"},"http://:5000/"),". If you are using HassOS with the addon, the host should be ",Object(r.b)("inlineCode",{parentName:"p"},"http://ccab4aaf-frigate:5000")," (or ",Object(r.b)("inlineCode",{parentName:"p"},"http://ccab4aaf-frigate-beta:5000")," if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant:"),Object(r.b)("h2",{id:"sensors"},"Sensors:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Stats to monitor frigate performance"),Object(r.b)("li",{parentName:"ul"},"Object counts for all zones and cameras")),Object(r.b)("h2",{id:"cameras"},"Cameras:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Cameras for image of the last detected object for each camera"),Object(r.b)("li",{parentName:"ul"},"Camera entities with stream support (requires RTMP)")),Object(r.b)("h2",{id:"media-browser"},"Media Browser:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Rich UI with thumbnails for browsing event clips"),Object(r.b)("li",{parentName:"ul"},"Rich UI for browsing 24/7 recordings by month, day, camera, time")),Object(r.b)("h2",{id:"api"},"API:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Notification API with public facing endpoints for images in notifications")),Object(r.b)("h3",{id:"notifications"},"Notifications"),Object(r.b)("p",null,"Frigate publishes event information in the form of a change feed via MQTT. This allows lots of customization for notifications to meet your needs. Event changes are published with ",Object(r.b)("inlineCode",{parentName:"p"},"before")," and ",Object(r.b)("inlineCode",{parentName:"p"},"after")," information as shown ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"#frigateevents"}),"here"),".\nNote that some people may not want to expose frigate to the web, so you can leverage the HA API that frigate custom_integration ties into (which is exposed to the web, and thus can be used for mobile notifications etc):"),Object(r.b)("p",null,"To load an image taken by frigate from HomeAssistants API see below:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{}),"https://HA_URL/api/frigate/notifications//thumbnail.jpg\n")),Object(r.b)("p",null,"To load a video clip taken by frigate from HomeAssistants API :"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{}),"https://HA_URL/api/frigate/notifications///clip.mp4\n")),Object(r.b)("p",null,'Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as frigate finds a "better" image. '),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),'automation:\n - alias: Notify of events\n trigger:\n platform: mqtt\n topic: frigate/events\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \'A {{trigger.payload_json["after"]["label"]}} was detected.\'\n data:\n image: \'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android\'\n tag: \'{{trigger.payload_json["after"]["id"]}}\'\n')),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"automation:\n - alias: When a person enters a zone named yard\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - \"{{ trigger.payload_json['after']['label'] == 'person' }}\"\n - \"{{ 'yard' in trigger.payload_json['after']['entered_zones'] }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \"A {{trigger.payload_json['after']['label']}} has entered the yard.\"\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"- alias: When a person leaves a zone named yard\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - \"{{ trigger.payload_json['after']['label'] == 'person' }}\"\n - \"{{ 'yard' in trigger.payload_json['before']['current_zones'] }}\"\n - \"{{ not 'yard' in trigger.payload_json['after']['current_zones'] }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \"A {{trigger.payload_json['after']['label']}} has left the yard.\"\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"- alias: Notify for dogs in the front with a high top score\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - \"{{ trigger.payload_json['after']['label'] == 'dog' }}\"\n - \"{{ trigger.payload_json['after']['camera'] == 'front' }}\"\n - \"{{ trigger.payload_json['after']['top_score'] > 0.98 }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: 'High confidence dog detection.'\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(r.b)("p",null,"If you are using telegram, you can fetch the image directly from Frigate:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),'automation:\n - alias: Notify of events\n trigger:\n platform: mqtt\n topic: frigate/events\n action:\n - service: notify.telegram_full\n data_template:\n message: \'A {{trigger.payload_json["after"]["label"]}} was detected.\'\n data:\n photo:\n # this url should work for addon users\n - url: \'http://ccab4aaf-frigate:5000/api/events/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg\'\n caption: \'A {{trigger.payload_json["after"]["label"]}} was detected on {{ trigger.payload_json["after"]["camera"] }} camera\'\n')))}p.isMDXComponent=!0},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"b",(function(){return g}));var n=a(0),i=a.n(n);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=i.a.createContext({}),p=function(e){var t=i.a.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},f=function(e){var t=p(e.components);return i.a.createElement(c.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=i.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),f=p(a),d=n,g=f["".concat(o,".").concat(d)]||f[d]||b[d]||r;return a?i.a.createElement(g,s(s({ref:t},c),{},{components:a})):i.a.createElement(g,s({ref:t},c))}));function g(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,o=new Array(r);o[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,o[1]=s;for(var c=2;c:5000/"),". If you are using HassOS with the addon, the host should be ",Object(r.b)("inlineCode",{parentName:"p"},"http://ccab4aaf-frigate:5000")," (or ",Object(r.b)("inlineCode",{parentName:"p"},"http://ccab4aaf-frigate-beta:5000")," if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant:"),Object(r.b)("h2",{id:"sensors"},"Sensors:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Stats to monitor frigate performance"),Object(r.b)("li",{parentName:"ul"},"Object counts for all zones and cameras")),Object(r.b)("h2",{id:"cameras"},"Cameras:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Cameras for image of the last detected object for each camera"),Object(r.b)("li",{parentName:"ul"},"Camera entities with stream support (requires RTMP)")),Object(r.b)("h2",{id:"media-browser"},"Media Browser:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Rich UI with thumbnails for browsing event clips"),Object(r.b)("li",{parentName:"ul"},"Rich UI for browsing 24/7 recordings by month, day, camera, time")),Object(r.b)("h2",{id:"api"},"API:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Notification API with public facing endpoints for images in notifications")),Object(r.b)("h3",{id:"notifications"},"Notifications"),Object(r.b)("p",null,"Frigate publishes event information in the form of a change feed via MQTT. This allows lots of customization for notifications to meet your needs. Event changes are published with ",Object(r.b)("inlineCode",{parentName:"p"},"before")," and ",Object(r.b)("inlineCode",{parentName:"p"},"after")," information as shown ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"#frigateevents"}),"here"),".\nNote that some people may not want to expose frigate to the web, so you can leverage the HA API that frigate custom_integration ties into (which is exposed to the web, and thus can be used for mobile notifications etc):"),Object(r.b)("p",null,"To load an image taken by frigate from HomeAssistants API see below:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{}),"https://HA_URL/api/frigate/notifications//thumbnail.jpg\n")),Object(r.b)("p",null,"To load a video clip taken by frigate from HomeAssistants API :"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{}),"https://HA_URL/api/frigate/notifications///clip.mp4\n")),Object(r.b)("p",null,'Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as frigate finds a "better" image. '),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),'automation:\n - alias: Notify of events\n trigger:\n platform: mqtt\n topic: frigate/events\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \'A {{trigger.payload_json["after"]["label"]}} was detected.\'\n data:\n image: \'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android\'\n tag: \'{{trigger.payload_json["after"]["id"]}}\'\n')),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"automation:\n - alias: When a person enters a zone named yard\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - \"{{ trigger.payload_json['after']['label'] == 'person' }}\"\n - \"{{ 'yard' in trigger.payload_json['after']['entered_zones'] }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \"A {{trigger.payload_json['after']['label']}} has entered the yard.\"\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"- alias: When a person leaves a zone named yard\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - \"{{ trigger.payload_json['after']['label'] == 'person' }}\"\n - \"{{ 'yard' in trigger.payload_json['before']['current_zones'] }}\"\n - \"{{ not 'yard' in trigger.payload_json['after']['current_zones'] }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \"A {{trigger.payload_json['after']['label']}} has left the yard.\"\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"- alias: Notify for dogs in the front with a high top score\n trigger:\n platform: mqtt\n topic: frigate/events\n condition:\n - \"{{ trigger.payload_json['after']['label'] == 'dog' }}\"\n - \"{{ trigger.payload_json['after']['camera'] == 'front' }}\"\n - \"{{ trigger.payload_json['after']['top_score'] > 0.98 }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: 'High confidence dog detection.'\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(r.b)("p",null,"If you are using telegram, you can fetch the image directly from Frigate:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),'automation:\n - alias: Notify of events\n trigger:\n platform: mqtt\n topic: frigate/events\n action:\n - service: notify.telegram_full\n data_template:\n message: \'A {{trigger.payload_json["after"]["label"]}} was detected.\'\n data:\n photo:\n # this url should work for addon users\n - url: \'http://ccab4aaf-frigate:5000/api/events/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg\'\n caption: \'A {{trigger.payload_json["after"]["label"]}} was detected on {{ trigger.payload_json["after"]["camera"] }} camera\'\n')))}p.isMDXComponent=!0},99:function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"b",(function(){return g}));var n=a(0),i=a.n(n);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=i.a.createContext({}),p=function(e){var t=i.a.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},f=function(e){var t=p(e.components);return i.a.createElement(c.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=i.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),f=p(a),d=n,g=f["".concat(o,".").concat(d)]||f[d]||b[d]||r;return a?i.a.createElement(g,s(s({ref:t},c),{},{components:a})):i.a.createElement(g,s({ref:t},c))}));function g(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,o=new Array(r);o[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,o[1]=s;for(var c=2;c0)&&(d.unobserve(t),d.disconnect(),n())}))}))).observe(t))},to:j||""},l&&{isActive:h,activeClassName:p}))}},103:function(e,t,n){"use strict";n.r(t);var r=n(10);n.d(t,"MemoryRouter",(function(){return r.d})),n.d(t,"Prompt",(function(){return r.f})),n.d(t,"Redirect",(function(){return r.g})),n.d(t,"Route",(function(){return r.h})),n.d(t,"Router",(function(){return r.i})),n.d(t,"StaticRouter",(function(){return r.j})),n.d(t,"Switch",(function(){return r.k})),n.d(t,"generatePath",(function(){return r.l})),n.d(t,"matchPath",(function(){return r.m})),n.d(t,"useHistory",(function(){return r.n})),n.d(t,"useLocation",(function(){return r.o})),n.d(t,"useParams",(function(){return r.p})),n.d(t,"useRouteMatch",(function(){return r.q})),n.d(t,"withRouter",(function(){return r.r})),n.d(t,"BrowserRouter",(function(){return r.a})),n.d(t,"HashRouter",(function(){return r.b})),n.d(t,"Link",(function(){return r.c})),n.d(t,"NavLink",(function(){return r.e}))},104:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return u}));var r=n(22),o=n(107);function i(){var e=Object(r.default)().siteConfig,t=(e=void 0===e?{}:e).baseUrl,n=void 0===t?"/":t,i=e.url;return{withBaseUrl:function(e,t){return function(e,t,n,r){var i=void 0===r?{}:r,u=i.forcePrependBaseUrl,s=void 0!==u&&u,c=i.absolute,a=void 0!==c&&c;if(!n)return n;if(n.startsWith("#"))return n;if(Object(o.b)(n))return n;if(s)return t+n;var f=n.startsWith(t)?n:t+n.replace(/^\//,"");return a?e+f:f}(i,n,e,t)}}}function u(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},107:function(e,t,n){"use strict";function r(e){return!0===/^(\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},117:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeConfig=void 0;var o=r(n(22));t.useThemeConfig=function(){return o.default().siteConfig.themeConfig}},118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDocsPluginEnabled=void 0;var r=n(101);t.isDocsPluginEnabled=!!r.useAllDocsData},119:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useDocsPreferredVersionContext=t.DocsPreferredVersionContextProvider=void 0;var s=i(n(0)),c=n(117),a=n(118),f=n(101),d=u(n(145));function l(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;var o={};return t.forEach((function(e){o[e]=function(e){var t=d.default.read(e,n);return r[e].versions.some((function(e){return e.name===t}))?{preferredVersionName:t}:(d.default.clear(e,n),{preferredVersionName:null})}(e)})),o}function v(){var e=f.useAllDocsData(),t=c.useThemeConfig().docs.versionPersistence,n=s.useMemo((function(){return Object.keys(e)}),[e]),r=s.useState((function(){return function(e){var t={};return e.forEach((function(e){t[e]={preferredVersionName:null}})),t}(n)})),o=r[0],i=r[1];return s.useEffect((function(){i(l({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[o,s.useMemo((function(){return{savePreferredVersion:function(e,n){d.default.save(e,t,n),i((function(t){var r;return Object.assign(Object.assign({},t),((r={})[e]={preferredVersionName:n},r))}))}}}),[i])]}var g=s.createContext(null);function p(e){var t=e.children,n=v();return s.default.createElement(g.Provider,{value:n},t)}t.DocsPreferredVersionContextProvider=function(e){var t=e.children;return a.isDocsPluginEnabled?s.default.createElement(p,null,t):s.default.createElement(s.default.Fragment,null,t)},t.useDocsPreferredVersionContext=function(){var e=s.useContext(g);if(!e)throw new Error("Can't find docs preferred context, maybe you forgot to use the DocsPreferredVersionContextProvider ?");return e}},138:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.docVersionSearchTag=t.DEFAULT_SEARCH_TAG=void 0,t.DEFAULT_SEARCH_TAG="default",t.docVersionSearchTag=function(e,t){return"docs-"+e+"-"+t}},139:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDocVersionSuggestions=t.useActiveDocContext=t.useActiveVersion=t.useLatestVersion=t.useVersions=t.useActivePluginAndVersion=t.useActivePlugin=t.useDocsData=t.useAllDocsData=void 0;var r=n(103),o=n(140),i=n(141);t.useAllDocsData=function(){return o.useAllPluginInstancesData("docusaurus-plugin-content-docs")},t.useDocsData=function(e){return o.usePluginData("docusaurus-plugin-content-docs",e)},t.useActivePlugin=function(e){void 0===e&&(e={});var n=t.useAllDocsData(),o=r.useLocation().pathname;return i.getActivePlugin(n,o,e)},t.useActivePluginAndVersion=function(e){void 0===e&&(e={});var n=t.useActivePlugin(e),o=r.useLocation().pathname;if(n)return{activePlugin:n,activeVersion:i.getActiveVersion(n.pluginData,o)}},t.useVersions=function(e){return t.useDocsData(e).versions},t.useLatestVersion=function(e){var n=t.useDocsData(e);return i.getLatestVersion(n)},t.useActiveVersion=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getActiveVersion(n,o)},t.useActiveDocContext=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getActiveDocContext(n,o)},t.useDocVersionSuggestions=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getDocVersionSuggestions(n,o)}},140:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o})),n.d(t,"useAllPluginInstancesData",(function(){return i})),n.d(t,"usePluginData",(function(){return u}));var r=n(22);function o(){var e=Object(r.default)().globalData;if(!e)throw new Error("Docusaurus global data not found");return e}function i(e){var t=o()[e];if(!t)throw new Error("Docusaurus plugin global data not found for pluginName="+e);return t}function u(e,t){void 0===t&&(t="default");var n=i(e)[t];if(!n)throw new Error("Docusaurus plugin global data not found for pluginName="+e+" and pluginId="+t);return n}},141:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocVersionSuggestions=t.getActiveDocContext=t.getActiveVersion=t.getLatestVersion=t.getActivePlugin=void 0;var r=n(103);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).find((function(e){e[0];var n=e[1];return!!r.matchPath(t,{path:n.path,exact:!1,strict:!1})})),i=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!i&&n.failfast)throw new Error("Can't find active docs plugin for pathname="+t+", while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: "+Object.values(e).map((function(e){return e.path})).join(", "));return i},t.getLatestVersion=function(e){return e.versions.find((function(e){return e.isLast}))},t.getActiveVersion=function(e,n){var o=t.getLatestVersion(e);return[].concat(e.versions.filter((function(e){return e!==o})),[o]).find((function(e){return!!r.matchPath(n,{path:e.path,exact:!1,strict:!1})}))},t.getActiveDocContext=function(e,n){var o,i,u=t.getActiveVersion(e,n),s=null==u?void 0:u.docs.find((function(e){return!!r.matchPath(n,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:u,activeDoc:s,alternateDocVersions:s?(o=s.id,i={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===o&&(i[e.name]=t)}))})),i):{}}},t.getDocVersionSuggestions=function(e,n){var r=t.getLatestVersion(e),o=t.getActiveDocContext(e,n),i=o.activeVersion!==r;return{latestDocSuggestion:i?null==o?void 0:o.alternateDocVersions[r.name]:void 0,latestVersionSuggestion:i?r:void 0}}},142:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSamePath=void 0,t.isSamePath=function(e,t){var n=function(e){return!e||(null==e?void 0:e.endsWith("/"))?e:e+"/"};return n(e)===n(t)}},143:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useTitleFormatter=void 0;var o=r(n(22));t.useTitleFormatter=function(e){var t=o.default().siteConfig,n=void 0===t?{}:t,r=n.title,i=n.titleDelimiter,u=void 0===i?"|":i;return e&&e.trim().length?e.trim()+" "+u+" "+r:r}},144:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDocsPreferredVersionByPluginId=t.useDocsPreferredVersion=void 0;var r=n(0),o=n(119),i=n(101),u=n(146);t.useDocsPreferredVersion=function(e){void 0===e&&(e=u.DEFAULT_PLUGIN_ID);var t=i.useDocsData(e),n=o.useDocsPreferredVersionContext(),s=n[0],c=n[1],a=s[e].preferredVersionName;return{preferredVersion:a?t.versions.find((function(e){return e.name===a})):null,savePreferredVersionName:r.useCallback((function(t){c.savePreferredVersion(e,t)}),[c])}},t.useDocsPreferredVersionByPluginId=function(){var e=i.useAllDocsData(),t=o.useDocsPreferredVersionContext()[0],n=Object.keys(e),r={};return n.forEach((function(n){r[n]=function(n){var r=e[n],o=t[n].preferredVersionName;return o?r.versions.find((function(e){return e.name===o})):null}(n)})),r}},145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return"docs-preferred-version-"+e},o={save:function(e,t,n){"none"===t||window.localStorage.setItem(r(e),n)},read:function(e,t){return"none"===t?null:window.localStorage.getItem(r(e))},clear:function(e,t){"none"===t||window.localStorage.removeItem(r(e))}};t.default=o},146:function(e,t,n){"use strict";n.r(t),n.d(t,"DEFAULT_PLUGIN_ID",(function(){return r}));var r="default"},99:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(117);Object.defineProperty(t,"useThemeConfig",{enumerable:!0,get:function(){return r.useThemeConfig}});var o=n(138);Object.defineProperty(t,"docVersionSearchTag",{enumerable:!0,get:function(){return o.docVersionSearchTag}}),Object.defineProperty(t,"DEFAULT_SEARCH_TAG",{enumerable:!0,get:function(){return o.DEFAULT_SEARCH_TAG}});var i=n(118);Object.defineProperty(t,"isDocsPluginEnabled",{enumerable:!0,get:function(){return i.isDocsPluginEnabled}});var u=n(142);Object.defineProperty(t,"isSamePath",{enumerable:!0,get:function(){return u.isSamePath}});var s=n(143);Object.defineProperty(t,"useTitleFormatter",{enumerable:!0,get:function(){return s.useTitleFormatter}});var c=n(144);Object.defineProperty(t,"useDocsPreferredVersion",{enumerable:!0,get:function(){return c.useDocsPreferredVersion}}),Object.defineProperty(t,"useDocsPreferredVersionByPluginId",{enumerable:!0,get:function(){return c.useDocsPreferredVersionByPluginId}});var a=n(119);Object.defineProperty(t,"DocsPreferredVersionContextProvider",{enumerable:!0,get:function(){return a.DocsPreferredVersionContextProvider}})}}]); \ No newline at end of file diff --git a/1.d4a988ac.js b/1.d4a988ac.js new file mode 100644 index 000000000..c1cb1c11d --- /dev/null +++ b/1.d4a988ac.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{100:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(118);Object.defineProperty(t,"useThemeConfig",{enumerable:!0,get:function(){return r.useThemeConfig}});var o=n(139);Object.defineProperty(t,"docVersionSearchTag",{enumerable:!0,get:function(){return o.docVersionSearchTag}}),Object.defineProperty(t,"DEFAULT_SEARCH_TAG",{enumerable:!0,get:function(){return o.DEFAULT_SEARCH_TAG}});var i=n(119);Object.defineProperty(t,"isDocsPluginEnabled",{enumerable:!0,get:function(){return i.isDocsPluginEnabled}});var u=n(143);Object.defineProperty(t,"isSamePath",{enumerable:!0,get:function(){return u.isSamePath}});var s=n(144);Object.defineProperty(t,"useTitleFormatter",{enumerable:!0,get:function(){return s.useTitleFormatter}});var c=n(145);Object.defineProperty(t,"useDocsPreferredVersion",{enumerable:!0,get:function(){return c.useDocsPreferredVersion}}),Object.defineProperty(t,"useDocsPreferredVersionByPluginId",{enumerable:!0,get:function(){return c.useDocsPreferredVersionByPluginId}});var a=n(120);Object.defineProperty(t,"DocsPreferredVersionContextProvider",{enumerable:!0,get:function(){return a.DocsPreferredVersionContextProvider}})},101:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t0)&&(d.unobserve(t),d.disconnect(),n())}))}))).observe(t))},to:j||""},l&&{isActive:h,activeClassName:p}))}},104:function(e,t,n){"use strict";n.r(t);var r=n(10);n.d(t,"MemoryRouter",(function(){return r.d})),n.d(t,"Prompt",(function(){return r.f})),n.d(t,"Redirect",(function(){return r.g})),n.d(t,"Route",(function(){return r.h})),n.d(t,"Router",(function(){return r.i})),n.d(t,"StaticRouter",(function(){return r.j})),n.d(t,"Switch",(function(){return r.k})),n.d(t,"generatePath",(function(){return r.l})),n.d(t,"matchPath",(function(){return r.m})),n.d(t,"useHistory",(function(){return r.n})),n.d(t,"useLocation",(function(){return r.o})),n.d(t,"useParams",(function(){return r.p})),n.d(t,"useRouteMatch",(function(){return r.q})),n.d(t,"withRouter",(function(){return r.r})),n.d(t,"BrowserRouter",(function(){return r.a})),n.d(t,"HashRouter",(function(){return r.b})),n.d(t,"Link",(function(){return r.c})),n.d(t,"NavLink",(function(){return r.e}))},105:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return u}));var r=n(22),o=n(108);function i(){var e=Object(r.default)().siteConfig,t=(e=void 0===e?{}:e).baseUrl,n=void 0===t?"/":t,i=e.url;return{withBaseUrl:function(e,t){return function(e,t,n,r){var i=void 0===r?{}:r,u=i.forcePrependBaseUrl,s=void 0!==u&&u,c=i.absolute,a=void 0!==c&&c;if(!n)return n;if(n.startsWith("#"))return n;if(Object(o.b)(n))return n;if(s)return t+n;var f=n.startsWith(t)?n:t+n.replace(/^\//,"");return a?e+f:f}(i,n,e,t)}}}function u(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},108:function(e,t,n){"use strict";function r(e){return!0===/^(\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},118:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useThemeConfig=void 0;var o=r(n(22));t.useThemeConfig=function(){return o.default().siteConfig.themeConfig}},119:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDocsPluginEnabled=void 0;var r=n(102);t.isDocsPluginEnabled=!!r.useAllDocsData},120:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useDocsPreferredVersionContext=t.DocsPreferredVersionContextProvider=void 0;var s=i(n(0)),c=n(118),a=n(119),f=n(102),d=u(n(146));function l(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;var o={};return t.forEach((function(e){o[e]=function(e){var t=d.default.read(e,n);return r[e].versions.some((function(e){return e.name===t}))?{preferredVersionName:t}:(d.default.clear(e,n),{preferredVersionName:null})}(e)})),o}function v(){var e=f.useAllDocsData(),t=c.useThemeConfig().docs.versionPersistence,n=s.useMemo((function(){return Object.keys(e)}),[e]),r=s.useState((function(){return function(e){var t={};return e.forEach((function(e){t[e]={preferredVersionName:null}})),t}(n)})),o=r[0],i=r[1];return s.useEffect((function(){i(l({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[o,s.useMemo((function(){return{savePreferredVersion:function(e,n){d.default.save(e,t,n),i((function(t){var r;return Object.assign(Object.assign({},t),((r={})[e]={preferredVersionName:n},r))}))}}}),[i])]}var g=s.createContext(null);function p(e){var t=e.children,n=v();return s.default.createElement(g.Provider,{value:n},t)}t.DocsPreferredVersionContextProvider=function(e){var t=e.children;return a.isDocsPluginEnabled?s.default.createElement(p,null,t):s.default.createElement(s.default.Fragment,null,t)},t.useDocsPreferredVersionContext=function(){var e=s.useContext(g);if(!e)throw new Error("Can't find docs preferred context, maybe you forgot to use the DocsPreferredVersionContextProvider ?");return e}},139:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.docVersionSearchTag=t.DEFAULT_SEARCH_TAG=void 0,t.DEFAULT_SEARCH_TAG="default",t.docVersionSearchTag=function(e,t){return"docs-"+e+"-"+t}},140:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDocVersionSuggestions=t.useActiveDocContext=t.useActiveVersion=t.useLatestVersion=t.useVersions=t.useActivePluginAndVersion=t.useActivePlugin=t.useDocsData=t.useAllDocsData=void 0;var r=n(104),o=n(141),i=n(142);t.useAllDocsData=function(){return o.useAllPluginInstancesData("docusaurus-plugin-content-docs")},t.useDocsData=function(e){return o.usePluginData("docusaurus-plugin-content-docs",e)},t.useActivePlugin=function(e){void 0===e&&(e={});var n=t.useAllDocsData(),o=r.useLocation().pathname;return i.getActivePlugin(n,o,e)},t.useActivePluginAndVersion=function(e){void 0===e&&(e={});var n=t.useActivePlugin(e),o=r.useLocation().pathname;if(n)return{activePlugin:n,activeVersion:i.getActiveVersion(n.pluginData,o)}},t.useVersions=function(e){return t.useDocsData(e).versions},t.useLatestVersion=function(e){var n=t.useDocsData(e);return i.getLatestVersion(n)},t.useActiveVersion=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getActiveVersion(n,o)},t.useActiveDocContext=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getActiveDocContext(n,o)},t.useDocVersionSuggestions=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getDocVersionSuggestions(n,o)}},141:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o})),n.d(t,"useAllPluginInstancesData",(function(){return i})),n.d(t,"usePluginData",(function(){return u}));var r=n(22);function o(){var e=Object(r.default)().globalData;if(!e)throw new Error("Docusaurus global data not found");return e}function i(e){var t=o()[e];if(!t)throw new Error("Docusaurus plugin global data not found for pluginName="+e);return t}function u(e,t){void 0===t&&(t="default");var n=i(e)[t];if(!n)throw new Error("Docusaurus plugin global data not found for pluginName="+e+" and pluginId="+t);return n}},142:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocVersionSuggestions=t.getActiveDocContext=t.getActiveVersion=t.getLatestVersion=t.getActivePlugin=void 0;var r=n(104);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).find((function(e){e[0];var n=e[1];return!!r.matchPath(t,{path:n.path,exact:!1,strict:!1})})),i=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!i&&n.failfast)throw new Error("Can't find active docs plugin for pathname="+t+", while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: "+Object.values(e).map((function(e){return e.path})).join(", "));return i},t.getLatestVersion=function(e){return e.versions.find((function(e){return e.isLast}))},t.getActiveVersion=function(e,n){var o=t.getLatestVersion(e);return[].concat(e.versions.filter((function(e){return e!==o})),[o]).find((function(e){return!!r.matchPath(n,{path:e.path,exact:!1,strict:!1})}))},t.getActiveDocContext=function(e,n){var o,i,u=t.getActiveVersion(e,n),s=null==u?void 0:u.docs.find((function(e){return!!r.matchPath(n,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:u,activeDoc:s,alternateDocVersions:s?(o=s.id,i={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===o&&(i[e.name]=t)}))})),i):{}}},t.getDocVersionSuggestions=function(e,n){var r=t.getLatestVersion(e),o=t.getActiveDocContext(e,n),i=o.activeVersion!==r;return{latestDocSuggestion:i?null==o?void 0:o.alternateDocVersions[r.name]:void 0,latestVersionSuggestion:i?r:void 0}}},143:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSamePath=void 0,t.isSamePath=function(e,t){var n=function(e){return!e||(null==e?void 0:e.endsWith("/"))?e:e+"/"};return n(e)===n(t)}},144:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useTitleFormatter=void 0;var o=r(n(22));t.useTitleFormatter=function(e){var t=o.default().siteConfig,n=void 0===t?{}:t,r=n.title,i=n.titleDelimiter,u=void 0===i?"|":i;return e&&e.trim().length?e.trim()+" "+u+" "+r:r}},145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDocsPreferredVersionByPluginId=t.useDocsPreferredVersion=void 0;var r=n(0),o=n(120),i=n(102),u=n(147);t.useDocsPreferredVersion=function(e){void 0===e&&(e=u.DEFAULT_PLUGIN_ID);var t=i.useDocsData(e),n=o.useDocsPreferredVersionContext(),s=n[0],c=n[1],a=s[e].preferredVersionName;return{preferredVersion:a?t.versions.find((function(e){return e.name===a})):null,savePreferredVersionName:r.useCallback((function(t){c.savePreferredVersion(e,t)}),[c])}},t.useDocsPreferredVersionByPluginId=function(){var e=i.useAllDocsData(),t=o.useDocsPreferredVersionContext()[0],n=Object.keys(e),r={};return n.forEach((function(n){r[n]=function(n){var r=e[n],o=t[n].preferredVersionName;return o?r.versions.find((function(e){return e.name===o})):null}(n)})),r}},146:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return"docs-preferred-version-"+e},o={save:function(e,t,n){"none"===t||window.localStorage.setItem(r(e),n)},read:function(e,t){return"none"===t?null:window.localStorage.getItem(r(e))},clear:function(e,t){"none"===t||window.localStorage.removeItem(r(e))}};t.default=o},147:function(e,t,n){"use strict";n.r(t),n.d(t,"DEFAULT_PLUGIN_ID",(function(){return r}));var r="default"}}]); \ No newline at end of file diff --git a/17896441.7ff44e5f.js b/17896441.7ff44e5f.js deleted file mode 100644 index 5041b6b46..000000000 --- a/17896441.7ff44e5f.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{95:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),r=a(23),c=a(99),i=a(22),o=a(104),m=a(102);var s=function(e){var t=e.metadata;return l.a.createElement("nav",{className:"pagination-nav","aria-label":"Blog list page navigation"},l.a.createElement("div",{className:"pagination-nav__item"},t.previous&&l.a.createElement(m.a,{className:"pagination-nav__link",to:t.previous.permalink},l.a.createElement("div",{className:"pagination-nav__sublabel"},"Previous"),l.a.createElement("div",{className:"pagination-nav__label"},"\xab ",t.previous.title))),l.a.createElement("div",{className:"pagination-nav__item pagination-nav__item--next"},t.next&&l.a.createElement(m.a,{className:"pagination-nav__link",to:t.next.permalink},l.a.createElement("div",{className:"pagination-nav__sublabel"},"Next"),l.a.createElement("div",{className:"pagination-nav__label"},t.next.title," \xbb"))))},d=a(101);var u=function(){var e=Object(i.default)().siteConfig.title,t=Object(d.useActivePlugin)({failfast:!0}).pluginId,a=Object(c.useDocsPreferredVersion)(t).savePreferredVersionName,n=Object(d.useActiveVersion)(t),r=Object(d.useDocVersionSuggestions)(t),o=r.latestDocSuggestion,s=r.latestVersionSuggestion;if(!s)return l.a.createElement(l.a.Fragment,null);var u,v=null!=o?o:(u=s).docs.find((function(e){return e.id===u.mainDocId}));return l.a.createElement("div",{className:"alert alert--warning margin-bottom--md",role:"alert"},"current"===n.name?l.a.createElement("div",null,"This is unreleased documentation for ",e," ",l.a.createElement("strong",null,n.label)," version."):l.a.createElement("div",null,"This is documentation for ",e," ",l.a.createElement("strong",null,n.label),", which is no longer actively maintained."),l.a.createElement("div",{className:"margin-top--md"},"For up-to-date documentation, see the"," ",l.a.createElement("strong",null,l.a.createElement(m.a,{to:v.path,onClick:function(){return a(s.name)}},"latest version"))," ","(",s.label,")."))},v=a(100);var E=function(e,t,a){var l=Object(n.useState)(void 0),r=l[0],c=l[1];Object(n.useEffect)((function(){function n(){var n=function(){var e=Array.from(document.getElementsByClassName("anchor")),t=e.find((function(e){return e.getBoundingClientRect().top>=a}));if(t){if(t.getBoundingClientRect().top>=a){var n=e[e.indexOf(t)-1];return null!=n?n:t}return t}return e[e.length-1]}();if(n)for(var l=0,i=!1,o=document.getElementsByClassName(e);l1,S=Object(c.useTitleFormatter)(_),V=Object(o.a)(g,{absolute:!0});return l.a.createElement(l.a.Fragment,null,l.a.createElement(r.a,null,l.a.createElement("title",null,S),l.a.createElement("meta",{property:"og:title",content:S}),h&&l.a.createElement("meta",{name:"description",content:h}),h&&l.a.createElement("meta",{property:"og:description",content:h}),f&&f.length&&l.a.createElement("meta",{name:"keywords",content:f.join(",")}),g&&l.a.createElement("meta",{property:"og:image",content:V}),g&&l.a.createElement("meta",{name:"twitter:image",content:V}),g&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+_}),O&&l.a.createElement("meta",{property:"og:url",content:a+O}),O&&l.a.createElement("link",{rel:"canonical",href:a+O})),l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:Object(v.a)("col",(t={},t[y.a.docItemCol]=!b,t))},l.a.createElement(u,null),l.a.createElement("div",{className:y.a.docItemContainer},l.a.createElement("article",null,A&&l.a.createElement("div",null,l.a.createElement("span",{className:"badge badge--secondary"},"Version: ",I.label)),!p&&l.a.createElement("header",null,l.a.createElement("h1",{className:y.a.docTitle},_)),l.a.createElement("div",{className:"markdown"},l.a.createElement(n,null))),(j||k||C)&&l.a.createElement("div",{className:"margin-vert--xl"},l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col"},j&&l.a.createElement("a",{href:j,target:"_blank",rel:"noreferrer noopener"},l.a.createElement(w,null),"Edit this page")),(k||C)&&l.a.createElement("div",{className:"col text--right"},l.a.createElement("em",null,l.a.createElement("small",null,"Last updated"," ",k&&l.a.createElement(l.a.Fragment,null,"on"," ",l.a.createElement("time",{dateTime:new Date(1e3*k).toISOString(),className:y.a.docLastUpdatedAt},new Date(1e3*k).toLocaleDateString()),C&&" "),C&&l.a.createElement(l.a.Fragment,null,"by ",l.a.createElement("strong",null,C)),!1))))),l.a.createElement("div",{className:"margin-vert--lg"},l.a.createElement(s,{metadata:m})))),!b&&n.toc&&l.a.createElement("div",{className:"col col--3"},l.a.createElement(N,{toc:n.toc}))))}}}]); \ No newline at end of file diff --git a/17896441.da8a454f.js b/17896441.da8a454f.js new file mode 100644 index 000000000..a9c46dc8d --- /dev/null +++ b/17896441.da8a454f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{96:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),r=a(23),c=a(100),i=a(22),o=a(105),m=a(103);var s=function(e){var t=e.metadata;return l.a.createElement("nav",{className:"pagination-nav","aria-label":"Blog list page navigation"},l.a.createElement("div",{className:"pagination-nav__item"},t.previous&&l.a.createElement(m.a,{className:"pagination-nav__link",to:t.previous.permalink},l.a.createElement("div",{className:"pagination-nav__sublabel"},"Previous"),l.a.createElement("div",{className:"pagination-nav__label"},"\xab ",t.previous.title))),l.a.createElement("div",{className:"pagination-nav__item pagination-nav__item--next"},t.next&&l.a.createElement(m.a,{className:"pagination-nav__link",to:t.next.permalink},l.a.createElement("div",{className:"pagination-nav__sublabel"},"Next"),l.a.createElement("div",{className:"pagination-nav__label"},t.next.title," \xbb"))))},d=a(102);var u=function(){var e=Object(i.default)().siteConfig.title,t=Object(d.useActivePlugin)({failfast:!0}).pluginId,a=Object(c.useDocsPreferredVersion)(t).savePreferredVersionName,n=Object(d.useActiveVersion)(t),r=Object(d.useDocVersionSuggestions)(t),o=r.latestDocSuggestion,s=r.latestVersionSuggestion;if(!s)return l.a.createElement(l.a.Fragment,null);var u,v=null!=o?o:(u=s).docs.find((function(e){return e.id===u.mainDocId}));return l.a.createElement("div",{className:"alert alert--warning margin-bottom--md",role:"alert"},"current"===n.name?l.a.createElement("div",null,"This is unreleased documentation for ",e," ",l.a.createElement("strong",null,n.label)," version."):l.a.createElement("div",null,"This is documentation for ",e," ",l.a.createElement("strong",null,n.label),", which is no longer actively maintained."),l.a.createElement("div",{className:"margin-top--md"},"For up-to-date documentation, see the"," ",l.a.createElement("strong",null,l.a.createElement(m.a,{to:v.path,onClick:function(){return a(s.name)}},"latest version"))," ","(",s.label,")."))},v=a(101);var E=function(e,t,a){var l=Object(n.useState)(void 0),r=l[0],c=l[1];Object(n.useEffect)((function(){function n(){var n=function(){var e=Array.from(document.getElementsByClassName("anchor")),t=e.find((function(e){return e.getBoundingClientRect().top>=a}));if(t){if(t.getBoundingClientRect().top>=a){var n=e[e.indexOf(t)-1];return null!=n?n:t}return t}return e[e.length-1]}();if(n)for(var l=0,i=!1,o=document.getElementsByClassName(e);l1,S=Object(c.useTitleFormatter)(_),V=Object(o.a)(g,{absolute:!0});return l.a.createElement(l.a.Fragment,null,l.a.createElement(r.a,null,l.a.createElement("title",null,S),l.a.createElement("meta",{property:"og:title",content:S}),h&&l.a.createElement("meta",{name:"description",content:h}),h&&l.a.createElement("meta",{property:"og:description",content:h}),f&&f.length&&l.a.createElement("meta",{name:"keywords",content:f.join(",")}),g&&l.a.createElement("meta",{property:"og:image",content:V}),g&&l.a.createElement("meta",{name:"twitter:image",content:V}),g&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+_}),O&&l.a.createElement("meta",{property:"og:url",content:a+O}),O&&l.a.createElement("link",{rel:"canonical",href:a+O})),l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:Object(v.a)("col",(t={},t[y.a.docItemCol]=!b,t))},l.a.createElement(u,null),l.a.createElement("div",{className:y.a.docItemContainer},l.a.createElement("article",null,A&&l.a.createElement("div",null,l.a.createElement("span",{className:"badge badge--secondary"},"Version: ",I.label)),!p&&l.a.createElement("header",null,l.a.createElement("h1",{className:y.a.docTitle},_)),l.a.createElement("div",{className:"markdown"},l.a.createElement(n,null))),(j||k||C)&&l.a.createElement("div",{className:"margin-vert--xl"},l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col"},j&&l.a.createElement("a",{href:j,target:"_blank",rel:"noreferrer noopener"},l.a.createElement(w,null),"Edit this page")),(k||C)&&l.a.createElement("div",{className:"col text--right"},l.a.createElement("em",null,l.a.createElement("small",null,"Last updated"," ",k&&l.a.createElement(l.a.Fragment,null,"on"," ",l.a.createElement("time",{dateTime:new Date(1e3*k).toISOString(),className:y.a.docLastUpdatedAt},new Date(1e3*k).toLocaleDateString()),C&&" "),C&&l.a.createElement(l.a.Fragment,null,"by ",l.a.createElement("strong",null,C)),!1))))),l.a.createElement("div",{className:"margin-vert--lg"},l.a.createElement(s,{metadata:m})))),!b&&n.toc&&l.a.createElement("div",{className:"col col--3"},l.a.createElement(N,{toc:n.toc}))))}}}]); \ No newline at end of file diff --git a/1c86fc29.f51a600f.js b/1c86fc29.b87ce1a5.js similarity index 98% rename from 1c86fc29.f51a600f.js rename to 1c86fc29.b87ce1a5.js index 0679d0190..98644c531 100644 --- a/1c86fc29.f51a600f.js +++ b/1c86fc29.b87ce1a5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{74:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return l})),r.d(t,"default",(function(){return p}));var a=r(3),n=r(7),o=(r(0),r(98)),i={id:"optimizing",title:"Optimizing performance"},c={unversionedId:"configuration/optimizing",id:"configuration/optimizing",isDocsHomePage:!1,title:"Optimizing performance",description:"- Google Coral//coral.ai",source:"@site/docs/configuration/optimizing.md",slug:"/configuration/optimizing",permalink:"/frigate/configuration/optimizing",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/optimizing.md",version:"current",sidebar:"docs",previous:{title:"Cameras",permalink:"/frigate/configuration/cameras"},next:{title:"Detectors",permalink:"/frigate/configuration/detectors"}},l=[{value:"FFmpeg Hardware Acceleration",id:"ffmpeg-hardware-acceleration",children:[]}],s={toc:l};function p(e){var t=e.components,r=Object(n.a)(e,["components"]);return Object(o.b)("wrapper",Object(a.a)({},s,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Google Coral"),": It is strongly recommended to use a Google Coral, but Frigate will fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from ",Object(o.b)("a",Object(a.a)({parentName:"li"},{href:"https://coral.ai"}),"https://coral.ai")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Resolution"),": For the ",Object(o.b)("inlineCode",{parentName:"li"},"detect")," input, choose a camera resolution where the smallest object you want to detect barely fits inside a 300x300px square. The model used by Frigate is trained on 300x300px images, so you will get worse performance and no improvement in accuracy by using a larger resolution since Frigate resizes the area where it is looking for objects to 300x300 anyway."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"FPS"),": 5 frames per second should be adequate. Higher frame rates will require more CPU usage without improving detections or accuracy. Reducing the frame rate on your camera will have the greatest improvement on system resources."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Hardware Acceleration"),": Make sure you configure the ",Object(o.b)("inlineCode",{parentName:"li"},"hwaccel_args")," for your hardware. They provide a significant reduction in CPU usage if they are available."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Masks"),": Masks can be used to ignore motion and reduce your idle CPU load. If you have areas with regular motion such as timestamps or trees blowing in the wind, frigate will constantly try to determine if that motion is from a person or other object you are tracking. Those detections not only increase your average CPU usage, but also clog the pipeline for detecting objects elsewhere. If you are experiencing high values for ",Object(o.b)("inlineCode",{parentName:"li"},"detection_fps")," when no objects of interest are in the cameras, you should use masks to tell frigate to ignore movement from trees, bushes, timestamps, or any part of the image where detections should not be wasted looking for objects.")),Object(o.b)("h3",{id:"ffmpeg-hardware-acceleration"},"FFmpeg Hardware Acceleration"),Object(o.b)("p",null,"Frigate works on Raspberry Pi 3b/4 and x86 machines. It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible."),Object(o.b)("p",null,"Raspberry Pi 3/4 (32-bit OS)\n",Object(o.b)("strong",{parentName:"p"},"NOTICE"),": If you are using the addon, ensure you turn off ",Object(o.b)("inlineCode",{parentName:"p"},"Protection mode")," for hardware acceleration."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -c:v\n - h264_mmal\n")),Object(o.b)("p",null,"Raspberry Pi 3/4 (64-bit OS)\n",Object(o.b)("strong",{parentName:"p"},"NOTICE"),": If you are using the addon, ensure you turn off ",Object(o.b)("inlineCode",{parentName:"p"},"Protection mode")," for hardware acceleration."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -c:v\n - h264_v4l2m2m\n")),Object(o.b)("p",null,"Intel-based CPUs (<10th Generation) via Quicksync (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - vaapi\n - -hwaccel_device\n - /dev/dri/renderD128\n - -hwaccel_output_format\n - yuv420p\n")),Object(o.b)("p",null,"Intel-based CPUs (>=10th Generation) via Quicksync (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - qsv\n - -qsv_device\n - /dev/dri/renderD128\n")),Object(o.b)("p",null,"AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")\n",Object(o.b)("strong",{parentName:"p"},"Note:")," You also need to set ",Object(o.b)("inlineCode",{parentName:"p"},"LIBVA_DRIVER_NAME=radeonsi")," as an environment variable on the container."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - vaapi\n - -hwaccel_device\n - /dev/dri/renderD128\n")),Object(o.b)("p",null,"Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/configuration/nvdec"}),"nvidia NVDEC documentation")," for more details."))}p.isMDXComponent=!0},98:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return d}));var a=r(0),n=r.n(a);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=n.a.createContext({}),p=function(e){var t=n.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},u=function(e){var t=p(e.components);return n.a.createElement(s.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},m=n.a.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(r),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return r?n.a.createElement(d,c(c({ref:t},s),{},{components:r})):n.a.createElement(d,c({ref:t},s))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;s=10th Generation) via Quicksync (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - qsv\n - -qsv_device\n - /dev/dri/renderD128\n")),Object(o.b)("p",null,"AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")\n",Object(o.b)("strong",{parentName:"p"},"Note:")," You also need to set ",Object(o.b)("inlineCode",{parentName:"p"},"LIBVA_DRIVER_NAME=radeonsi")," as an environment variable on the container."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - vaapi\n - -hwaccel_device\n - /dev/dri/renderD128\n")),Object(o.b)("p",null,"Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/configuration/nvdec"}),"nvidia NVDEC documentation")," for more details."))}p.isMDXComponent=!0},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return d}));var a=r(0),n=r.n(a);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=n.a.createContext({}),p=function(e){var t=n.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},u=function(e){var t=p(e.components);return n.a.createElement(s.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},m=n.a.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(r),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return r?n.a.createElement(d,c(c({ref:t},s),{},{components:r})):n.a.createElement(d,c({ref:t},s))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;se.length)&&(t=e.length);for(var a=0,n=new Array(t);a=i?c(!1):a+r0&&r.a.createElement("div",{className:"row footer__links"},o.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(le,e))}))):null)}))),(i||a)&&r.a.createElement("div",{className:"footer__bottom text--center"},i&&i.src&&r.a.createElement("div",{className:"margin-bottom--sm"},i.href?r.a.createElement("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:oe.a.footerLogoLink},r.a.createElement(ie,{alt:i.alt,url:u})):r.a.createElement(ie,{alt:i.alt,url:u})),a?r.a.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:a}}):null))):null},ue=a(9),de="light",me="dark",fe=function(e){return e===me?me:de},he=function(){return ue.a.canUseDOM?fe(document.documentElement.getAttribute("data-theme")):de},ve=function(e){try{localStorage.setItem("theme",fe(e))}catch(t){console.error(t)}},be=function(){var e=Object(s.useThemeConfig)().colorMode,t=e.disableSwitch,a=e.respectPrefersColorScheme,r=Object(n.useState)(he),c=r[0],o=r[1],l=Object(n.useCallback)((function(){o(de),ve(de)}),[]),i=Object(n.useCallback)((function(){o(me),ve(me)}),[]);return Object(n.useEffect)((function(){document.documentElement.setAttribute("data-theme",fe(c))}),[c]),Object(n.useEffect)((function(){if(!t)try{var e=localStorage.getItem("theme");null!==e&&o(fe(e))}catch(a){console.error(a)}}),[o]),Object(n.useEffect)((function(){t&&!a||window.matchMedia("(prefers-color-scheme: dark)").addListener((function(e){var t=e.matches;o(t?me:de)}))}),[]),{isDarkTheme:c===me,setLightTheme:l,setDarkTheme:i}},pe=a(124);var ge=function(e){var t=be(),a=t.isDarkTheme,n=t.setLightTheme,c=t.setDarkTheme;return r.a.createElement(pe.a.Provider,{value:{isDarkTheme:a,setLightTheme:n,setDarkTheme:c}},e.children)},Oe="docusaurus.tab.",Ee=function(){var e=Object(n.useState)({}),t=e[0],a=e[1],r=Object(n.useCallback)((function(e,t){try{localStorage.setItem("docusaurus.tab."+e,t)}catch(a){console.error(a)}}),[]);return Object(n.useEffect)((function(){try{for(var e={},t=0;t996?r.desktop:r.mobile}var a=Object(n.useState)(t),c=a[0],o=a[1];return Object(n.useEffect)((function(){if(e)return window.addEventListener("resize",a),function(){return window.removeEventListener("resize",a)};function a(){o(t())}}),[]),c}},128:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c);t.a=function(e){var t=e.width,a=void 0===t?30:t,c=e.height,l=void 0===c?30:c,i=e.className,s=Object(r.a)(e,["width","height","className"]);return o.a.createElement("svg",Object(n.a)({"aria-label":"Menu",className:i,width:a,height:l,viewBox:"0 0 30 30",role:"img",focusable:"false"},s),o.a.createElement("title",null,"Menu"),o.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}},137:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(102),i=a(100),s=a(22),u=a(112),d=a(59),m=a.n(d),f=function(e){var t=Object(s.default)().isClient,a=Object(u.a)().isDarkTheme,c=e.sources,l=e.className,d=e.alt,f=void 0===d?"":d,h=Object(r.a)(e,["sources","className","alt"]),v=t?a?["dark"]:["light"]:["light","dark"];return o.a.createElement(o.a.Fragment,null,v.map((function(e){return o.a.createElement("img",Object(n.a)({key:e,src:c[e],alt:f,className:Object(i.a)(m.a.themedImage,m.a["themedImage--"+e],l)},h))})))},h=a(104),v=a(99),b=a(107);t.a=function(e){var t=Object(s.default)().isClient,a=Object(v.useThemeConfig)().navbar,c=a.title,i=a.logo,u=void 0===i?{src:""}:i,d=e.imageClassName,m=e.titleClassName,p=Object(r.a)(e,["imageClassName","titleClassName"]),g=Object(h.a)(u.href||"/"),O=u.target?{target:u.target}:Object(b.a)(g)?{}:{rel:"noopener noreferrer",target:"_blank"},E={light:Object(h.a)(u.src),dark:Object(h.a)(u.srcDark||u.src)};return o.a.createElement(l.a,Object(n.a)({to:g},p,O),u.src&&o.a.createElement(f,{key:t,className:d,sources:E,alt:u.alt||c||"Logo"}),null!=c&&o.a.createElement("strong",{className:m},c))}},147:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=ta?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["className","icons"])),c=(0,l.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},a);return o.default.createElement("div",{className:c,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},o.default.createElement("div",{className:"react-toggle-track"},o.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),o.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),o.default.createElement("div",{className:"react-toggle-thumb"}),o.default.createElement("input",n({},r,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(c.PureComponent);t.default=f,f.displayName="Toggle",f.defaultProps={icons:{checked:o.default.createElement(s.default,null),unchecked:o.default.createElement(u.default,null)}},f.propTypes={checked:i.default.bool,disabled:i.default.bool,defaultChecked:i.default.bool,onChange:i.default.func,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string,name:i.default.string,value:i.default.string,id:i.default.string,"aria-labelledby":i.default.string,"aria-label":i.default.string,icons:i.default.oneOfType([i.default.bool,i.default.shape({checked:i.default.node,unchecked:i.default.node})])}},148:function(e,t,a){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t0){var a=t[0];return{x:a.clientX,y:a.clientY}}var n=e.pageX;if(void 0!==n)return{x:n,y:e.pageY}}return{x:0,y:0}}},152:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return u}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(106),i=a(101),s=a(99);function u(e){var t,a=e.label,c=e.to,u=e.docsPluginId,d=Object(r.a)(e,["label","to","docsPluginId"]),m=Object(i.useActiveVersion)(u),f=Object(s.useDocsPreferredVersion)(u).preferredVersion,h=Object(i.useLatestVersion)(u),v=null!==(t=null!=m?m:f)&&void 0!==t?t:h,b=null!=a?a:v.label,p=null!=c?c:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(v).path;return o.a.createElement(l.a,Object(n.a)({},d,{label:b,to:p}))}},153:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(106),i=a(101),s=a(99),u=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};function d(e){var t,a,c=e.mobile,d=e.docsPluginId,m=e.dropdownActiveClassDisabled,f=e.dropdownItemsBefore,h=e.dropdownItemsAfter,v=Object(r.a)(e,["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"]),b=Object(i.useActiveDocContext)(d),p=Object(i.useVersions)(d),g=Object(i.useLatestVersion)(d),O=Object(s.useDocsPreferredVersion)(d),E=O.preferredVersion,k=O.savePreferredVersionName;var j=null!==(t=null!==(a=b.activeVersion)&&void 0!==a?a:E)&&void 0!==t?t:g,y=c?"Versions":j.label,C=c?void 0:u(j).path;return o.a.createElement(l.a,Object(n.a)({},v,{mobile:c,label:y,to:C,items:function(){var e=p.map((function(e){var t=(null==b?void 0:b.alternateDocVersions[e.name])||u(e);return{isNavLink:!0,label:e.label,to:t.path,isActive:function(){return e===(null==b?void 0:b.activeVersion)},onClick:function(){k(e.name)}}})),t=[].concat(f,e,h);if(!(t.length<=1))return t}(),isActive:m?function(){return!1}:void 0}))}},154:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(106),i=a(101),s=a(100),u=a(99);function d(e){var t,a,c=e.docId,d=e.activeSidebarClassName,m=e.label,f=e.docsPluginId,h=Object(r.a)(e,["docId","activeSidebarClassName","label","docsPluginId"]),v=Object(i.useActiveDocContext)(f),b=v.activeVersion,p=v.activeDoc,g=Object(u.useDocsPreferredVersion)(f).preferredVersion,O=Object(i.useLatestVersion)(f),E=null!==(t=null!=b?b:g)&&void 0!==t?t:O,k=E.docs.find((function(e){return e.id===c}));if(!k)throw new Error("DocNavbarItem: couldn't find any doc with id="+c+" in version "+E.name+".\nAvailable docIds=\n- "+E.docs.join("\n- "));return o.a.createElement(l.a,Object(n.a)({exact:!0},h,{className:Object(s.a)(h.className,(a={},a[d]=p&&p.sidebar===k.sidebar,a)),label:null!=m?m:k.id,to:k.path}))}}}]); \ No newline at end of file diff --git a/2.cbe00df1.js b/2.cbe00df1.js new file mode 100644 index 000000000..0ba7b60d4 --- /dev/null +++ b/2.cbe00df1.js @@ -0,0 +1,2 @@ +/*! For license information please see 2.cbe00df1.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{107:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(101),i=a(103),s=a(105),u=a(104),d=a(100);function m(e){var t=e.activeBasePath,a=e.activeBaseRegex,c=e.to,l=e.href,u=e.label,d=e.activeClassName,m=void 0===d?"navbar__link--active":d,f=e.prependBaseUrlToHref,h=Object(r.a)(e,["activeBasePath","activeBaseRegex","to","href","label","activeClassName","prependBaseUrlToHref"]),v=Object(s.a)(c),b=Object(s.a)(t),p=Object(s.a)(l,{forcePrependBaseUrl:!0});return o.a.createElement(i.a,Object(n.a)({},l?{target:"_blank",rel:"noopener noreferrer",href:f?p:l}:Object.assign({isNavLink:!0,activeClassName:m,to:v},t||a?{isActive:function(e,t){return a?new RegExp(a).test(t.pathname):t.pathname.startsWith(b)}}:null),h),u)}function f(e){var t=e.items,a=e.position,i=e.className,s=Object(r.a)(e,["items","position","className"]),u=Object(c.useRef)(null),d=Object(c.useRef)(null),f=Object(c.useState)(!1),h=f[0],v=f[1];Object(c.useEffect)((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[u]);var b=function(e,t){return void 0===t&&(t=!1),Object(l.a)({"navbar__item navbar__link":!t,dropdown__link:t},e)};return t?o.a.createElement("div",{ref:u,className:Object(l.a)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--left":"left"===a,"dropdown--right":"right"===a,"dropdown--show":h})},o.a.createElement(m,Object(n.a)({className:b(i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),v(!h))}}),s.label),o.a.createElement("ul",{ref:d,className:"dropdown__menu"},t.map((function(e,a){var c=e.className,l=Object(r.a)(e,["className"]);return o.a.createElement("li",{key:a},o.a.createElement(m,Object(n.a)({onKeyDown:function(e){if(a===t.length-1&&"Tab"===e.key){e.preventDefault(),v(!1);var n=u.current.nextElementSibling;n&&n.focus()}},activeClassName:"dropdown__link--active",className:b(c,!0)},l)))})))):o.a.createElement(m,Object(n.a)({className:b(i)},s))}function h(e){var t,a,i=e.items,s=e.className,f=(e.position,Object(r.a)(e,["items","className","position"])),h=Object(c.useRef)(null),v=Object(u.useLocation)().pathname,b=Object(c.useState)((function(){var e;return null===(e=!(null!=i&&i.some((function(e){return Object(d.isSamePath)(e.to,v)}))))||void 0===e||e})),p=b[0],g=b[1],O=function(e,t){return void 0===t&&(t=!1),Object(l.a)("menu__link",{"menu__link--sublist":t},e)};if(!i)return o.a.createElement("li",{className:"menu__list-item"},o.a.createElement(m,Object(n.a)({className:O(s)},f)));var E=null!==(t=h.current)&&void 0!==t&&t.scrollHeight?(null===(a=h.current)||void 0===a?void 0:a.scrollHeight)+"px":void 0;return o.a.createElement("li",{className:Object(l.a)("menu__list-item",{"menu__list-item--collapsed":p})},o.a.createElement(m,Object(n.a)({role:"button",className:O(s,!0)},f,{onClick:function(){g((function(e){return!e}))}}),f.label),o.a.createElement("ul",{className:"menu__list",ref:h,style:{height:p?void 0:E}},i.map((function(e,t){var a=e.className,c=Object(r.a)(e,["className"]);return o.a.createElement("li",{className:"menu__list-item",key:t},o.a.createElement(m,Object(n.a)({activeClassName:"menu__link--active",className:O(a)},c,{onClick:f.onClick})))}))))}t.a=function(e){var t=e.mobile,a=void 0!==t&&t,n=Object(r.a)(e,["mobile"]),c=a?h:f;return o.a.createElement(c,n)}},110:function(e,t,a){"use strict";var n=a(0),r=a.n(n),c=a(101),o=a(56),l=a.n(o);var i=function(){return r.a.createElement("nav",{"aria-label":"Skip navigation links"},r.a.createElement("button",{type:"button",tabIndex:0,className:l.a.skipToContent,onKeyDown:function(e){if(13===e.keyCode){document.activeElement.blur();var t=document.querySelector("main:first-of-type");t&&t.scrollIntoView()}}},"Skip to main content"))},s=a(100),u=a(121),d=a(57),m=a.n(d);var f=function(){var e,t=Object(u.a)(),a=t.isAnnouncementBarClosed,n=t.closeAnnouncementBar,o=Object(s.useThemeConfig)().announcementBar;if(!o)return null;var l=o.content,i=o.backgroundColor,d=o.textColor,f=o.isCloseable;return!l||f&&a?null:r.a.createElement("div",{className:m.a.announcementBar,style:{backgroundColor:i,color:d},role:"banner"},r.a.createElement("div",{className:Object(c.a)(m.a.announcementBarContent,(e={},e[m.a.announcementBarCloseable]=f,e)),dangerouslySetInnerHTML:{__html:l}}),f?r.a.createElement("button",{type:"button",className:m.a.announcementBarClose,onClick:n,"aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")):null)},h=a(3),v=a(7),b=a(25),p=a(22),g=a(104),O=a(105),E=a(103),k=a(23),j=a(123);function y(){return r.a.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.a.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var C=a(124);function w(){return(w=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var a=0,n=new Array(t);a=i?c(!1):a+r0&&r.a.createElement("div",{className:"row footer__links"},o.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(le,e))}))):null)}))),(i||a)&&r.a.createElement("div",{className:"footer__bottom text--center"},i&&i.src&&r.a.createElement("div",{className:"margin-bottom--sm"},i.href?r.a.createElement("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:oe.a.footerLogoLink},r.a.createElement(ie,{alt:i.alt,url:u})):r.a.createElement(ie,{alt:i.alt,url:u})),a?r.a.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:a}}):null))):null},ue=a(9),de="light",me="dark",fe=function(e){return e===me?me:de},he=function(){return ue.a.canUseDOM?fe(document.documentElement.getAttribute("data-theme")):de},ve=function(e){try{localStorage.setItem("theme",fe(e))}catch(t){console.error(t)}},be=function(){var e=Object(s.useThemeConfig)().colorMode,t=e.disableSwitch,a=e.respectPrefersColorScheme,r=Object(n.useState)(he),c=r[0],o=r[1],l=Object(n.useCallback)((function(){o(de),ve(de)}),[]),i=Object(n.useCallback)((function(){o(me),ve(me)}),[]);return Object(n.useEffect)((function(){document.documentElement.setAttribute("data-theme",fe(c))}),[c]),Object(n.useEffect)((function(){if(!t)try{var e=localStorage.getItem("theme");null!==e&&o(fe(e))}catch(a){console.error(a)}}),[o]),Object(n.useEffect)((function(){t&&!a||window.matchMedia("(prefers-color-scheme: dark)").addListener((function(e){var t=e.matches;o(t?me:de)}))}),[]),{isDarkTheme:c===me,setLightTheme:l,setDarkTheme:i}},pe=a(125);var ge=function(e){var t=be(),a=t.isDarkTheme,n=t.setLightTheme,c=t.setDarkTheme;return r.a.createElement(pe.a.Provider,{value:{isDarkTheme:a,setLightTheme:n,setDarkTheme:c}},e.children)},Oe="docusaurus.tab.",Ee=function(){var e=Object(n.useState)({}),t=e[0],a=e[1],r=Object(n.useCallback)((function(e,t){try{localStorage.setItem("docusaurus.tab."+e,t)}catch(a){console.error(a)}}),[]);return Object(n.useEffect)((function(){try{for(var e={},t=0;t996?r.desktop:r.mobile}var a=Object(n.useState)(t),c=a[0],o=a[1];return Object(n.useEffect)((function(){if(e)return window.addEventListener("resize",a),function(){return window.removeEventListener("resize",a)};function a(){o(t())}}),[]),c}},129:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c);t.a=function(e){var t=e.width,a=void 0===t?30:t,c=e.height,l=void 0===c?30:c,i=e.className,s=Object(r.a)(e,["width","height","className"]);return o.a.createElement("svg",Object(n.a)({"aria-label":"Menu",className:i,width:a,height:l,viewBox:"0 0 30 30",role:"img",focusable:"false"},s),o.a.createElement("title",null,"Menu"),o.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}},138:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(103),i=a(101),s=a(22),u=a(113),d=a(59),m=a.n(d),f=function(e){var t=Object(s.default)().isClient,a=Object(u.a)().isDarkTheme,c=e.sources,l=e.className,d=e.alt,f=void 0===d?"":d,h=Object(r.a)(e,["sources","className","alt"]),v=t?a?["dark"]:["light"]:["light","dark"];return o.a.createElement(o.a.Fragment,null,v.map((function(e){return o.a.createElement("img",Object(n.a)({key:e,src:c[e],alt:f,className:Object(i.a)(m.a.themedImage,m.a["themedImage--"+e],l)},h))})))},h=a(105),v=a(100),b=a(108);t.a=function(e){var t=Object(s.default)().isClient,a=Object(v.useThemeConfig)().navbar,c=a.title,i=a.logo,u=void 0===i?{src:""}:i,d=e.imageClassName,m=e.titleClassName,p=Object(r.a)(e,["imageClassName","titleClassName"]),g=Object(h.a)(u.href||"/"),O=u.target?{target:u.target}:Object(b.a)(g)?{}:{rel:"noopener noreferrer",target:"_blank"},E={light:Object(h.a)(u.src),dark:Object(h.a)(u.srcDark||u.src)};return o.a.createElement(l.a,Object(n.a)({to:g},p,O),u.src&&o.a.createElement(f,{key:t,className:d,sources:E,alt:u.alt||c||"Logo"}),null!=c&&o.a.createElement("strong",{className:m},c))}},148:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=ta?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["className","icons"])),c=(0,l.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},a);return o.default.createElement("div",{className:c,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},o.default.createElement("div",{className:"react-toggle-track"},o.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),o.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),o.default.createElement("div",{className:"react-toggle-thumb"}),o.default.createElement("input",n({},r,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(c.PureComponent);t.default=f,f.displayName="Toggle",f.defaultProps={icons:{checked:o.default.createElement(s.default,null),unchecked:o.default.createElement(u.default,null)}},f.propTypes={checked:i.default.bool,disabled:i.default.bool,defaultChecked:i.default.bool,onChange:i.default.func,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string,name:i.default.string,value:i.default.string,id:i.default.string,"aria-labelledby":i.default.string,"aria-label":i.default.string,icons:i.default.oneOfType([i.default.bool,i.default.shape({checked:i.default.node,unchecked:i.default.node})])}},149:function(e,t,a){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t0){var a=t[0];return{x:a.clientX,y:a.clientY}}var n=e.pageX;if(void 0!==n)return{x:n,y:e.pageY}}return{x:0,y:0}}},153:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return u}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(107),i=a(102),s=a(100);function u(e){var t,a=e.label,c=e.to,u=e.docsPluginId,d=Object(r.a)(e,["label","to","docsPluginId"]),m=Object(i.useActiveVersion)(u),f=Object(s.useDocsPreferredVersion)(u).preferredVersion,h=Object(i.useLatestVersion)(u),v=null!==(t=null!=m?m:f)&&void 0!==t?t:h,b=null!=a?a:v.label,p=null!=c?c:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(v).path;return o.a.createElement(l.a,Object(n.a)({},d,{label:b,to:p}))}},154:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(107),i=a(102),s=a(100),u=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};function d(e){var t,a,c=e.mobile,d=e.docsPluginId,m=e.dropdownActiveClassDisabled,f=e.dropdownItemsBefore,h=e.dropdownItemsAfter,v=Object(r.a)(e,["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"]),b=Object(i.useActiveDocContext)(d),p=Object(i.useVersions)(d),g=Object(i.useLatestVersion)(d),O=Object(s.useDocsPreferredVersion)(d),E=O.preferredVersion,k=O.savePreferredVersionName;var j=null!==(t=null!==(a=b.activeVersion)&&void 0!==a?a:E)&&void 0!==t?t:g,y=c?"Versions":j.label,C=c?void 0:u(j).path;return o.a.createElement(l.a,Object(n.a)({},v,{mobile:c,label:y,to:C,items:function(){var e=p.map((function(e){var t=(null==b?void 0:b.alternateDocVersions[e.name])||u(e);return{isNavLink:!0,label:e.label,to:t.path,isActive:function(){return e===(null==b?void 0:b.activeVersion)},onClick:function(){k(e.name)}}})),t=[].concat(f,e,h);if(!(t.length<=1))return t}(),isActive:m?function(){return!1}:void 0}))}},155:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(107),i=a(102),s=a(101),u=a(100);function d(e){var t,a,c=e.docId,d=e.activeSidebarClassName,m=e.label,f=e.docsPluginId,h=Object(r.a)(e,["docId","activeSidebarClassName","label","docsPluginId"]),v=Object(i.useActiveDocContext)(f),b=v.activeVersion,p=v.activeDoc,g=Object(u.useDocsPreferredVersion)(f).preferredVersion,O=Object(i.useLatestVersion)(f),E=null!==(t=null!=b?b:g)&&void 0!==t?t:O,k=E.docs.find((function(e){return e.id===c}));if(!k)throw new Error("DocNavbarItem: couldn't find any doc with id="+c+" in version "+E.name+".\nAvailable docIds=\n- "+E.docs.join("\n- "));return o.a.createElement(l.a,Object(n.a)({exact:!0},h,{className:Object(s.a)(h.className,(a={},a[d]=p&&p.sidebar===k.sidebar,a)),label:null!=m?m:k.id,to:k.path}))}}}]); \ No newline at end of file diff --git a/2.20025fd4.js.LICENSE.txt b/2.cbe00df1.js.LICENSE.txt similarity index 100% rename from 2.20025fd4.js.LICENSE.txt rename to 2.cbe00df1.js.LICENSE.txt diff --git a/26.6ab32484.js b/27.c9d23ccf.js similarity index 78% rename from 26.6ab32484.js rename to 27.c9d23ccf.js index 8ae791947..2dde38673 100644 --- a/26.6ab32484.js +++ b/27.c9d23ccf.js @@ -1,2 +1,2 @@ -/*! For license information please see 26.6ab32484.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{108:function(e,t,n){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var n=0;n0}},129:function(e,t,n){"use strict";var r=n(113),i=n(114),a=n(161),s=n(108),c=n(162),u=n(130),o=n(115),f=n(163),h=n(164);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,n){return l(t[n],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||f(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var n=this;Object.keys(t).forEach((function(e){var r=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!r&&i&&(n[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(n){var r=e[n];if("string"==typeof r){var i=parseFloat(r);t[n]=isNaN(i)?r:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach((function(t){var r=e.numericRefinements[t]||{};n[t]={},Object.keys(r).forEach((function(e){var i=r[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));n[t][e]=i}))})),t.numericRefinements=n}return r({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var n=t.getHierarchicalRefinement(e.name);n.length>0&&0!==n[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(n=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var n=t||{};return e.tagFilters&&n.tagRefinements&&n.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&n.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&n.numericRefinements&&o(n.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&n.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:h.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:h.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:h.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:h.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,n){var i=c(n);if(this.isNumericRefined(e,t,i))return this;var a=r({},this.numericRefinements);return a[e]=r({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,n){return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,c(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,r){return r===e&&n.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,n){return n===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,n=this.numericRefinements,r=Object.keys(n).reduce((function(r,i){var a=n[i],s={};return a=a||{},Object.keys(a).forEach((function(n){var r=a[n]||[],c=[];r.forEach((function(t){e({val:t,op:n},i,"numeric")||c.push(t)})),c.length!==r.length&&(t=!0),s[n]=c})),r[i]=s,r}),{});return t?r:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:h.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:h.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return h.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:h.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:h.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:h.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return h.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:h.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:h.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:h.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:h.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var n={};return n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&h.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&h.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&h.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var n=this.getHierarchicalRefinement(e);return t?-1!==n.indexOf(t):n.length>0},isNumericRefined:function(e,t,n){if(void 0===n&&void 0===t)return!!this.numericRefinements[e];var r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===n||!r)return r;var i,a,u=c(n),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return r&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},n=this;return Object.keys(this).forEach((function(r){var i=n[r];-1===e.indexOf(r)&&void 0!==i&&(t[r]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return n[e]=t,this.setQueryParameters(n)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var n=this,r=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=n[t],e}),{}),a=Object.keys(r).reduce((function(e,t){var n=void 0!==e[t],i=void 0!==r[t];return n&&!i?u(e,[t]):(i&&(e[t]=r[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(n).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},130:function(e,t,n){"use strict";e.exports=function(e,t){if(null===e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}},131:function(e,t,n){"use strict";var r=n(113),i=n(114),a=n(132),s=n(165),c=n(108),u=n(166),o=n(133),f=n(167);function h(e){var t={};return e.forEach((function(e,n){t[e]=n})),t}function l(e,t,n){t&&t[n]&&(e.stats=t[n])}function m(e,t){var n=t[0];this._rawResults=t;var a=this;Object.keys(n).forEach((function(e){a[e]=n[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var o=e.getRefinedDisjunctiveFacets(),m=h(e.facets),d=h(e.disjunctiveFacets),v=1,p=n.facets||{};Object.keys(p).forEach((function(t){var r,i,s=p[t],o=(r=e.hierarchicalFacets,i=t,c(r,(function(e){return(e.attributes||[]).indexOf(i)>-1})));if(o){var f=o.attributes.indexOf(t),h=u(e.hierarchicalFacets,(function(e){return e.name===o.name}));a.hierarchicalFacets[h][f]={attribute:t,data:s,exhaustive:n.exhaustiveFacetsCount}}else{var v,g=-1!==e.disjunctiveFacets.indexOf(t),y=-1!==e.facets.indexOf(t);g&&(v=d[t],a.disjunctiveFacets[v]={name:t,data:s,exhaustive:n.exhaustiveFacetsCount},l(a.disjunctiveFacets[v],n.facets_stats,t)),y&&(v=m[t],a.facets[v]={name:t,data:s,exhaustive:n.exhaustiveFacetsCount},l(a.facets[v],n.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),o.forEach((function(s){var c=t[v],o=c&&c.facets?c.facets:{},f=e.getHierarchicalFacetByName(s);Object.keys(o).forEach((function(t){var s,h=o[t];if(f){s=u(e.hierarchicalFacets,(function(e){return e.name===f.name}));var m=u(a.hierarchicalFacets[s],(function(e){return e.attribute===t}));if(-1===m)return;a.hierarchicalFacets[s][m].data=r({},a.hierarchicalFacets[s][m].data,h)}else{s=d[t];var v=n.facets&&n.facets[t]||{};a.disjunctiveFacets[s]={name:t,data:i({},h,v),exhaustive:c.exhaustiveFacetsCount},l(a.disjunctiveFacets[s],c.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!a.disjunctiveFacets[s].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(n)>-1&&(a.disjunctiveFacets[s].data[n]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(n){var r=e.getHierarchicalFacetByName(n),s=e._getHierarchicalFacetSeparator(r),c=e.getHierarchicalRefinement(n);if(!(0===c.length||c[0].split(s).length<2)){var o=t[v],f=o&&o.facets?o.facets:{};Object.keys(f).forEach((function(t){var n=f[t],o=u(e.hierarchicalFacets,(function(e){return e.name===r.name})),h=u(a.hierarchicalFacets[o],(function(e){return e.attribute===t}));if(-1!==h){var l={};if(c.length>0){var m=c[0].split(s)[0];l[m]=a.hierarchicalFacets[o][h].data[m]}a.hierarchicalFacets[o][h].data=i(l,n,a.hierarchicalFacets[o][h].data)}})),v++}})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],i=m[t];a.facets[i]={name:t,data:n.facets[t],exhaustive:n.exhaustiveFacetsCount},r.forEach((function(e){a.facets[i]=a.facets[i]||{name:t},a.facets[i].data=a.facets[i].data||{},a.facets[i].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(f(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function d(e,t){if(!t.data||0===t.data.length)return t;var n=t.data.map((function(t){return d(e,t)})),i=e(n);return r({},t,{data:i})}function v(e,t){var n=c(e,(function(e){return e.name===t}));return n&&n.stats}function p(e,t,n,r,i){var a=c(i,(function(e){return e.name===n})),s=a&&a.data&&a.data[r]?a.data[r]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:n,name:r,count:s,exhaustive:u}}m.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},m.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],m.prototype.getFacetValues=function(e,t){var n=function(e,t){function n(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var r=c(e.facets,n);return r?Object.keys(r.data).map((function(n){return{name:n,count:r.data[n],isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,n)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,n);return i?Object.keys(i.data).map((function(n){return{name:n,count:i.data[n],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,n)}(this,e);if(n){var r=i({},t,{sortBy:m.DEFAULT_SORT});if(Array.isArray(r.sortBy)){var s=o(r.sortBy,m.DEFAULT_SORT);return Array.isArray(n)?a(n,s[0],s[1]):d((function(e){return a(e,s[0],s[1])}),n)}if("function"==typeof r.sortBy)return Array.isArray(n)?n.sort(r.sortBy):d((function(e){return function(e,t){return t.sort(e)}(r.sortBy,e)}),n);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}},m.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?v(this.facets,e):this._state.isDisjunctiveFacet(e)?v(this.disjunctiveFacets,e):void 0},m.prototype.getRefinements=function(){var e=this._state,t=this,n=[];return Object.keys(e.facetsRefinements).forEach((function(r){e.facetsRefinements[r].forEach((function(i){n.push(p(e,"facet",r,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(r){e.facetsExcludes[r].forEach((function(i){n.push(p(e,"exclude",r,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(r){e.disjunctiveFacetsRefinements[r].forEach((function(i){n.push(p(e,"disjunctive",r,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(r){e.hierarchicalFacetsRefinements[r].forEach((function(i){n.push(function(e,t,n,r){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=n.split(a),u=c(r,(function(e){return e.name===t})),o=s.reduce((function(e,t){var n=e&&c(e.data,(function(e){return e.name===t}));return void 0!==n?n:e}),u),f=o&&o.count||0,h=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:f,exhaustive:h}}(e,r,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var r=e.numericRefinements[t];Object.keys(r).forEach((function(e){r[e].forEach((function(r){n.push({type:"numeric",attributeName:t,name:r,numericValue:r,operator:e})}))}))})),e.tagRefinements.forEach((function(e){n.push({type:"tag",attributeName:"_tags",name:e})})),n},e.exports=m},132:function(e,t,n){"use strict";function r(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||r&&i||!n)return 1;if(!r&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-t.index})),i.map((function(e){return e.value}))}},133:function(e,t,n){"use strict";var r=n(108);e.exports=function(e,t){var n=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=r(n,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},134:function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function c(){c.init.call(this)}e.exports=c,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==a&&e.removeListener("error",a),n([].slice.call(arguments))}var a;"error"!==t&&(a=function(n){e.removeListener(t,i),r(n)},e.once("error",a)),e.once(t,i)}))},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var u=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function h(e,t,n,r){var i,a,s,c;if(o(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=f(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,c=u,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var o=u.length,f=p(u,o);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},c.prototype.listeners=function(e){return d(this,e,!0)},c.prototype.rawListeners=function(e){return d(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},c.prototype.listenerCount=v,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},135:function(e,t,n){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},136:function(e,t,n){"use strict";e.exports="3.3.4"},159:function(e,t,n){"use strict";var r=n(160),i=n(129),a=n(131);function s(e,t,n){return new r(e,t,n)}s.version=n(136),s.AlgoliaSearchHelper=r,s.SearchParameters=i,s.SearchResults=a,e.exports=s},160:function(e,t,n){"use strict";var r=n(129),i=n(131),a=n(168),s=n(169),c=n(134),u=n(135),o=n(115),f=n(136);function h(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+f+")"),this.setClient(e);var i=n||{};i.index=t,this.state=r.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function l(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function m(){return this.state.page}u(h,c.EventEmitter),h.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},h.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},h.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},h.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,r=s._getQueries(n.index,n),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(r).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(n,e.results),state:n,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(r).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(n,e.results),n)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,n)}))},h.prototype.searchForFacetValues=function(e,t,n,r){var i="function"==typeof this.client.searchForFacetValues;if(!i&&"function"!=typeof this.client.initIndex)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var a=this.state.setQueryParameters(r||{}),c=a.isDisjunctiveFacet(e),u=s.getSearchForFacetQuery(e,t,n,a);this._currentNbQueries++;var o=this;return this.emit("searchForFacetValues",{state:a,facet:e,query:t}),(i?this.client.searchForFacetValues([{indexName:a.index,params:u}]):this.client.initIndex(a.index).searchForFacetValues(u)).then((function(t){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.isRefined=c?a.isDisjunctiveFacetRefined(e,t.value):a.isFacetRefined(e,t.value)})),t}),(function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e}))},h.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},h.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},h.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},h.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},h.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},h.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},h.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},h.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},h.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},h.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},h.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},h.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},h.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},h.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},h.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},h.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},h.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},h.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},h.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},h.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},h.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},h.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},h.prototype.setCurrentPage=l,h.prototype.setPage=l,h.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},h.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},h.prototype.setState=function(e){return this._change({state:r.make(e),isPageReset:!1}),this},h.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new r(e),this},h.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},h.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},h.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},h.prototype.hasTag=function(e){return this.state.isTagRefined(e)},h.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},h.prototype.getIndex=function(){return this.state.index},h.prototype.getCurrentPage=m,h.prototype.getPage=m,h.prototype.getTags=function(){return this.state.tagRefinements},h.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var n=this.state.getNumericRefinements(e);return Object.keys(n).forEach((function(e){var r=n[e];t.push({value:r,operator:e,type:"numeric"})})),t},h.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},h.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},h.prototype._search=function(e){var t=this.state,n=[],r=[];e.onlyWithDerivedHelpers||(r=s._getQueries(t.index,t),n.push({state:t,queriesCount:r.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var r=e.getModifiedState(t),i=s._getQueries(r.index,r);return n.push({state:r,queriesCount:i.length,helper:e}),e.emit("search",{state:r,results:e.lastResults}),i})),a=Array.prototype.concat.apply(r,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,n,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},h.prototype._dispatchAlgoliaResponse=function(e,t,n){if(!(t0},h.prototype._change=function(e){var t=e.state,n=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:n}))},h.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},h.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+f+")"),this.client=e),this},h.prototype.getClient=function(){return this.client},h.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},h.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},h.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=h},161:function(e,t,n){"use strict";e.exports=function(e,t){return e.filter((function(n,r){return t.indexOf(n)>-1&&e.indexOf(n)===r}))}},162:function(e,t,n){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},163:function(e,t,n){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},164:function(e,t,n){"use strict";var r=n(114),i=n(130),a=n(115),s={addRefinement:function(e,t,n){if(s.isRefined(e,t,n))return e;var i=""+n,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,r({},c,e)},removeRefinement:function(e,t,n){if(void 0===n)return s.clearRefinement(e,(function(e,n){return t===n}));var r=""+n;return s.clearRefinement(e,(function(e,n){return t===n&&r===e}))},toggleRefinement:function(e,t,n){if(void 0===n)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,n)?s.removeRefinement(e,t,n):s.addRefinement(e,t,n)},clearRefinement:function(e,t,n){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var r=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,n)}));return c.length!==s.length&&(r=!0),i[a]=c,i}),{});return r?s:e}},isRefined:function(e,t,n){var r=!!e[t]&&e[t].length>0;if(void 0===n||!r)return r;var i=""+n;return-1!==e[t].indexOf(i)}};e.exports=s},165:function(e,t,n){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},166:function(e,t,n){"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n0){var h=0;for(f=c;h0&&s[0].split(c).length>1&&n.push({indexName:e,params:i._getDisjunctiveFacetSearchParams(t,r,!0)})})),n},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(i._getHitsHierarchicalFacetsAttributes(e)),n=i._getFacetFilters(e),a=i._getNumericFilters(e),s={facets:t,tagFilters:i._getTagFilters(e)};return n.length>0&&(s.facetFilters=n),a.length>0&&(s.numericFilters=a),r({},e.getQueryParams(),s)},_getDisjunctiveFacetSearchParams:function(e,t,n){var a=i._getFacetFilters(e,t,n),s=i._getNumericFilters(e,t),c={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:i._getTagFilters(e),analytics:!1,clickAnalytics:!1},u=e.getHierarchicalFacetByName(t);return c.facets=u?i._getDisjunctiveHierarchicalFacetAttribute(e,u,n):t,s.length>0&&(c.numericFilters=s),a.length>0&&(c.facetFilters=a),r({},e.getQueryParams(),c)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return Object.keys(e.numericRefinements).forEach((function(r){var i=e.numericRefinements[r]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==r&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return r+e+t}));n.push(i)}else n.push(r+e+t)}))}))})),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,n){var r=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){r.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){r.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var n=s[e]||[];if(e!==t&&n&&0!==n.length){var i=[];n.forEach((function(t){i.push(e+":"+t)})),r.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),f=e._getHierarchicalFacetSeparator(o),h=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(f)||!h&&!0===n||h&&h.split(f).length===a.split(f).length)return;h?(u=h.split(f).length-1,a=h):(u=a.split(f).length-2,a=a.slice(0,a.lastIndexOf(f))),s=o.attributes[u]}else u=a.split(f).length-1,s=o.attributes[u];s&&r.push([s+":"+a])}})),r},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,n){var r=e.getHierarchicalRefinement(n.name)[0];if(!r)return t.push(n.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(n),a=r.split(i).length,s=n.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(!0===n){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(r).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(r).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,n,a){var s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof n&&(c.maxFacetHits=n),r({},i._getHitsSearchParams(s),c)}};e.exports=i},170:function(e,t,n){e.exports=function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n=JSON.stringify(e),r=a()[n];return Promise.all([r||t(),void 0!==r])})).then((function(e){var t=i(e,2),r=t[0],a=t[1];return Promise.all([r,a||n.miss(r)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function c(e){var t=a(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch((function(){return c({caches:t}).get(e,r,i)}))},set:function(e,r){return n.set(e,r).catch((function(){return c({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=r(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function f(e,t){return t?(Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e):e}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return n(n({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),r=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(0===r.length&&0===e?1:r.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,r,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var r=Array.isArray(e.data)?e.data:n(n({},e.data),t.data);return JSON.stringify(r)}}(r,i),u=function(e,t){var r=n(n({},e.headers),t.headers),i={};return Object.keys(r).forEach((function(e){var t=r[e];i[e.toLowerCase()]=t})),i}(e,i),o=r.method,f=r.method!==F?{}:n(n({},r.data),i.data),h=n(n(n({"x-algolia-agent":e.userAgent.value},e.queryParameters),f),i.queryParameters),l=0,m=function t(n,a){var f=n.pop();if(void 0===f)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:_(s)};var m={data:c,headers:u,method:o,url:O(f,r.path,h),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:f,triesLeft:n.length};return s.push(t),t},v={onSucess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var i=d(r);return r.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(f,y(f,r.isTimedOut?g:p))]).then((function(){return t(n,a)}))},onFail:function(e){throw d(e),function(e,t){var n=e.content,r=e.status,i=n;try{i=JSON.parse(n).message}catch(e){}return function(e,t,n){return{name:"ApiError",message:e,status:t,transporterStackTrace:n}}(i,r,t)}(e,_(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&0==~~n}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSucess(e):t.onFail(e)}(e,v)}))};return j(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function E(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}function O(e,t,n){var r=x(n),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return r.length&&(i+="?".concat(r)),i}function x(e){return Object.keys(e).map((function(t){return h("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function _(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return n(n({},e),{},{request:n(n({},e.request),{},{headers:n(n({},e.request.headers),t)})})}var N=function(e){var t=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?r:{}},queryParameters:function(){return e===l.WithinQueryParameters?r:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,f=e.queryParameters,h={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:f,hosts:o.map((function(e){return R(e)})),read:function(e,t){var n=m(t,h.timeouts.read),r=function(){return P(h,h.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,n)};if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:h.queryParameters,headers:h.headers}};return h.responsesCache.get(a,(function(){return h.requestsCache.get(a,(function(){return h.requestsCache.set(a,r()).then((function(e){return Promise.all([h.requestsCache.delete(a),e])}),(function(e){return Promise.all([h.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return h.responsesCache.set(a,e)}})},write:function(e,t){return P(h,h.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,h.timeouts.write))}};return h}(n(n({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:n(n(n({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:n(n({},r.queryParameters()),e.queryParameters)}));return f({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},H=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f({transporter:e.transporter,appId:e.appId,indexName:t},n.methods)}},A=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},r)}},S=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=r(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:C}}).searchForFacetValues(s,c,n(n({},i),u))})))}},Q=function(e){return function(t,n,r){return e.transporter.read({method:b,path:h("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},T=function(e){return function(t,n){return e.transporter.read({method:b,path:h("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},C=function(e){return function(t,n,r){return e.transporter.read({method:b,path:h("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},D=1,k=2,I=3;function q(e,t,r){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,i=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=i(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(i=I,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.8.4","-").concat(e)}),u()]}),userAgent:E("4.8.4").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(n(n(n({},a),r),{},{methods:{search:A,searchForFacetValues:S,multipleQueries:A,multipleSearchForFacetValues:S,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:T,searchForFacetValues:C,findAnswers:Q}})}}}}))}return q.version="4.8.4",q}()},82:function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=n(170),s=n.n(a),c=n(159),u=n.n(c),o=n(100),f=n(23),h=n(102),l=n(9),m=n(99),d=n(22),v=n(101),p=n(122),g=n(109),y=n(83),R=n.n(y);var F=function(e){var t=e.docsSearchVersionsHelpers,n=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return i.a.createElement("div",{className:Object(o.a)("col","col--3","padding-left--none",R.a.searchVersionColumn)},n.map((function(e){var r=e[0],a=e[1],s=n.length>1?r+": ":"";return i.a.createElement("select",{key:r,onChange:function(e){return t.setSearchVersion(r,e.target.value)},defaultValue:t.searchVersions[r],className:R.a.searchVersionInput},a.versions.map((function(e,t){return i.a.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))};t.default=function(){var e,t,n,a,c,y=Object(d.default)().siteConfig,b=(y=void 0===y?{}:y).themeConfig.algolia,j=(b=void 0===b?{}:b).appId,P=void 0===j?"BH4D9OD16A":j,E=b.apiKey,O=b.indexName,x=(e=Object(v.useAllDocsData)(),t=Object(r.useState)((function(){return Object.entries(e).reduce((function(e,t){var n,r=t[0],i=t[1];return Object.assign({},e,((n={})[r]=i.versions[0].name,n))}),{})})),n=t[0],a=t[1],c=Object.values(e).some((function(e){return e.versions.length>1})),{allDocsData:e,versioningEnabled:c,searchVersions:n,setSearchVersion:function(e,t){return a((function(n){var r;return Object.assign({},n,((r={})[e]=t,r))}))}}),_=Object(p.a)(),w=_.searchValue,N=_.updateSearchPath,H=Object(r.useState)(w),A=H[0],S=H[1],Q={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},T=Object(r.useReducer)((function(e,t){var n=t.type,r=t.value;switch(n){case"reset":return Q;case"loading":return Object.assign({},e,{loading:!0});case"update":return A!==r.query?e:Object.assign({},r,{items:0===r.lastPage?r.items:e.items.concat(r.items)});case"advance":var i=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:i?e.lastPage+1:e.lastPage,hasMore:i});default:return e}}),Q),C=T[0],D=T[1],k=s()(P,E),I=u()(k,O,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["docusaurus_tag"]});I.on("result",(function(e){var t=e.results,n=t.query,r=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==n&&r instanceof Array){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=r.map((function(e){var t=e.url,n=e._highlightResult.hierarchy,r=e._snippetResult,i=void 0===r?{}:r,a=new URL(t),s=a.pathname,u=a.hash,o=Object.keys(n).map((function(e){return c(n[e].value)}));return{title:o.pop(),url:s+u,summary:i.content?c(i.content.value)+"...":"",breadcrumbs:o}}));D({type:"update",value:{items:u,query:n,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else D({type:"reset"})}));var q,L,V=Object(r.useState)(null),B=V[0],M=V[1],z=Object(r.useRef)(0),J=Object(r.useRef)(l.a.canUseDOM&&new IntersectionObserver((function(e){var t=e[0],n=t.isIntersecting,r=t.boundingClientRect.y;n&&z.current>r&&D({type:"advance"}),z.current=r}),{threshold:1})),W=function(){return A?'Search results for "'+A+'"':"Search the documentation"},U=function(e){void 0===e&&(e=0),I.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Object.entries(x.searchVersions).forEach((function(e){var t=e[0],n=e[1];I.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+n)})),I.setQuery(A).setPage(e).search()};return Object(r.useEffect)((function(){if(B)return J.current.observe(B),function(){J.current.unobserve(B)}}),[B]),Object(r.useEffect)((function(){N(A),D({type:"reset"}),A&&(D({type:"loading"}),setTimeout((function(){U()}),300))}),[A,x.searchVersions]),Object(r.useEffect)((function(){C.lastPage&&0!==C.lastPage&&U(C.lastPage)}),[C.lastPage]),Object(r.useEffect)((function(){w&&w!==A&&S(w)}),[w]),i.a.createElement(g.a,{wrapperClassName:"search-page-wrapper"},i.a.createElement(f.a,null,i.a.createElement("title",null,Object(m.useTitleFormatter)(W())),i.a.createElement("meta",{property:"robots",content:"noindex, follow"})),i.a.createElement("div",{className:"container margin-vert--lg"},i.a.createElement("h1",null,W()),i.a.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},i.a.createElement("div",{className:Object(o.a)("col",R.a.searchQueryColumn,{"col--9":x.versioningEnabled,"col--12":!x.versioningEnabled})},i.a.createElement("input",{type:"search",name:"q",className:R.a.searchQueryInput,placeholder:"Type your search here","aria-label":"Search",onChange:function(e){return S(e.target.value)},value:A,autoComplete:"off",autoFocus:!0})),x.versioningEnabled&&i.a.createElement(F,{docsSearchVersionsHelpers:x})),i.a.createElement("div",{className:Object(o.a)("row","margin-vert--sm")},i.a.createElement("div",{className:Object(o.a)("col","col--8",R.a.searchResultsColumn)},!!C.totalResults&&i.a.createElement("strong",null,C.totalResults," ",(q=C.totalResults,L="document",q>1?L+"s":L)," found")),i.a.createElement("div",{className:Object(o.a)("col","col--4",R.a.searchLogoColumn)},i.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":"Search"},i.a.createElement("svg",{viewBox:"0 0 168 24",className:R.a.algoliaLogo,xmlns:"http://www.w3.org/2000/svg","aria-label":"Search by Algolia"},i.a.createElement("g",{fill:"none"},i.a.createElement("path",{className:R.a.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),i.a.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),i.a.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),C.items.length>0?i.a.createElement("section",null,C.items.map((function(e,t){var n=e.title,r=e.url,a=e.summary,s=e.breadcrumbs;return i.a.createElement("article",{key:t,className:R.a.searchResultItem},i.a.createElement(h.a,{to:r,className:R.a.searchResultItemHeading,dangerouslySetInnerHTML:{__html:n}}),s.length>0&&i.a.createElement("span",{className:R.a.searchResultItemPath},s.map((function(e,t){return i.a.createElement(i.a.Fragment,null,0!==t&&i.a.createElement("span",{className:R.a.searchResultItemPathSeparator},"\u203a"),i.a.createElement("span",{dangerouslySetInnerHTML:{__html:e}}))}))),a&&i.a.createElement("p",{className:R.a.searchResultItemSummary,dangerouslySetInnerHTML:{__html:a}}))}))):[A&&!C.loading&&i.a.createElement("p",{key:"no-results"},"No results were found"),!!C.loading&&i.a.createElement("div",{key:"spinner",className:R.a.loadingSpinner})],C.hasMore&&i.a.createElement("div",{className:R.a.loader,ref:M},i.a.createElement("span",null,"Fetching new results..."))))}}}]); \ No newline at end of file +/*! For license information please see 27.c9d23ccf.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{109:function(e,t,n){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var n=0;n0}},130:function(e,t,n){"use strict";var r=n(114),i=n(115),a=n(162),s=n(109),c=n(163),u=n(131),o=n(116),f=n(164),h=n(165);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,n){return l(t[n],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||f(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var n=this;Object.keys(t).forEach((function(e){var r=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!r&&i&&(n[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(n){var r=e[n];if("string"==typeof r){var i=parseFloat(r);t[n]=isNaN(i)?r:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach((function(t){var r=e.numericRefinements[t]||{};n[t]={},Object.keys(r).forEach((function(e){var i=r[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));n[t][e]=i}))})),t.numericRefinements=n}return r({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var n=t.getHierarchicalRefinement(e.name);n.length>0&&0!==n[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(n=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var n=t||{};return e.tagFilters&&n.tagRefinements&&n.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&n.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&n.numericRefinements&&o(n.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&n.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:h.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:h.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:h.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:h.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,n){var i=c(n);if(this.isNumericRefined(e,t,i))return this;var a=r({},this.numericRefinements);return a[e]=r({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,n){return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,c(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,r){return r===e&&n.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,n){return n===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,n=this.numericRefinements,r=Object.keys(n).reduce((function(r,i){var a=n[i],s={};return a=a||{},Object.keys(a).forEach((function(n){var r=a[n]||[],c=[];r.forEach((function(t){e({val:t,op:n},i,"numeric")||c.push(t)})),c.length!==r.length&&(t=!0),s[n]=c})),r[i]=s,r}),{});return t?r:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:h.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:h.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return h.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:h.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:h.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return h.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:h.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return h.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:h.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:h.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:h.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:h.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var n={};return n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&h.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&h.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&h.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var n=this.getHierarchicalRefinement(e);return t?-1!==n.indexOf(t):n.length>0},isNumericRefined:function(e,t,n){if(void 0===n&&void 0===t)return!!this.numericRefinements[e];var r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===n||!r)return r;var i,a,u=c(n),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return r&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},n=this;return Object.keys(this).forEach((function(r){var i=n[r];-1===e.indexOf(r)&&void 0!==i&&(t[r]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return n[e]=t,this.setQueryParameters(n)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var n=this,r=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=n[t],e}),{}),a=Object.keys(r).reduce((function(e,t){var n=void 0!==e[t],i=void 0!==r[t];return n&&!i?u(e,[t]):(i&&(e[t]=r[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(n).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},131:function(e,t,n){"use strict";e.exports=function(e,t){if(null===e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}},132:function(e,t,n){"use strict";var r=n(114),i=n(115),a=n(133),s=n(166),c=n(109),u=n(167),o=n(134),f=n(168);function h(e){var t={};return e.forEach((function(e,n){t[e]=n})),t}function l(e,t,n){t&&t[n]&&(e.stats=t[n])}function m(e,t){var n=t[0];this._rawResults=t;var a=this;Object.keys(n).forEach((function(e){a[e]=n[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var o=e.getRefinedDisjunctiveFacets(),m=h(e.facets),d=h(e.disjunctiveFacets),v=1,p=n.facets||{};Object.keys(p).forEach((function(t){var r,i,s=p[t],o=(r=e.hierarchicalFacets,i=t,c(r,(function(e){return(e.attributes||[]).indexOf(i)>-1})));if(o){var f=o.attributes.indexOf(t),h=u(e.hierarchicalFacets,(function(e){return e.name===o.name}));a.hierarchicalFacets[h][f]={attribute:t,data:s,exhaustive:n.exhaustiveFacetsCount}}else{var v,g=-1!==e.disjunctiveFacets.indexOf(t),y=-1!==e.facets.indexOf(t);g&&(v=d[t],a.disjunctiveFacets[v]={name:t,data:s,exhaustive:n.exhaustiveFacetsCount},l(a.disjunctiveFacets[v],n.facets_stats,t)),y&&(v=m[t],a.facets[v]={name:t,data:s,exhaustive:n.exhaustiveFacetsCount},l(a.facets[v],n.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),o.forEach((function(s){var c=t[v],o=c&&c.facets?c.facets:{},f=e.getHierarchicalFacetByName(s);Object.keys(o).forEach((function(t){var s,h=o[t];if(f){s=u(e.hierarchicalFacets,(function(e){return e.name===f.name}));var m=u(a.hierarchicalFacets[s],(function(e){return e.attribute===t}));if(-1===m)return;a.hierarchicalFacets[s][m].data=r({},a.hierarchicalFacets[s][m].data,h)}else{s=d[t];var v=n.facets&&n.facets[t]||{};a.disjunctiveFacets[s]={name:t,data:i({},h,v),exhaustive:c.exhaustiveFacetsCount},l(a.disjunctiveFacets[s],c.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!a.disjunctiveFacets[s].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(n)>-1&&(a.disjunctiveFacets[s].data[n]=0)}))}})),v++})),e.getRefinedHierarchicalFacets().forEach((function(n){var r=e.getHierarchicalFacetByName(n),s=e._getHierarchicalFacetSeparator(r),c=e.getHierarchicalRefinement(n);if(!(0===c.length||c[0].split(s).length<2)){var o=t[v],f=o&&o.facets?o.facets:{};Object.keys(f).forEach((function(t){var n=f[t],o=u(e.hierarchicalFacets,(function(e){return e.name===r.name})),h=u(a.hierarchicalFacets[o],(function(e){return e.attribute===t}));if(-1!==h){var l={};if(c.length>0){var m=c[0].split(s)[0];l[m]=a.hierarchicalFacets[o][h].data[m]}a.hierarchicalFacets[o][h].data=i(l,n,a.hierarchicalFacets[o][h].data)}})),v++}})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],i=m[t];a.facets[i]={name:t,data:n.facets[t],exhaustive:n.exhaustiveFacetsCount},r.forEach((function(e){a.facets[i]=a.facets[i]||{name:t},a.facets[i].data=a.facets[i].data||{},a.facets[i].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(f(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function d(e,t){if(!t.data||0===t.data.length)return t;var n=t.data.map((function(t){return d(e,t)})),i=e(n);return r({},t,{data:i})}function v(e,t){var n=c(e,(function(e){return e.name===t}));return n&&n.stats}function p(e,t,n,r,i){var a=c(i,(function(e){return e.name===n})),s=a&&a.data&&a.data[r]?a.data[r]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:n,name:r,count:s,exhaustive:u}}m.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},m.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],m.prototype.getFacetValues=function(e,t){var n=function(e,t){function n(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var r=c(e.facets,n);return r?Object.keys(r.data).map((function(n){return{name:n,count:r.data[n],isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,n)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,n);return i?Object.keys(i.data).map((function(n){return{name:n,count:i.data[n],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,n)}(this,e);if(n){var r=i({},t,{sortBy:m.DEFAULT_SORT});if(Array.isArray(r.sortBy)){var s=o(r.sortBy,m.DEFAULT_SORT);return Array.isArray(n)?a(n,s[0],s[1]):d((function(e){return a(e,s[0],s[1])}),n)}if("function"==typeof r.sortBy)return Array.isArray(n)?n.sort(r.sortBy):d((function(e){return function(e,t){return t.sort(e)}(r.sortBy,e)}),n);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}},m.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?v(this.facets,e):this._state.isDisjunctiveFacet(e)?v(this.disjunctiveFacets,e):void 0},m.prototype.getRefinements=function(){var e=this._state,t=this,n=[];return Object.keys(e.facetsRefinements).forEach((function(r){e.facetsRefinements[r].forEach((function(i){n.push(p(e,"facet",r,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(r){e.facetsExcludes[r].forEach((function(i){n.push(p(e,"exclude",r,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(r){e.disjunctiveFacetsRefinements[r].forEach((function(i){n.push(p(e,"disjunctive",r,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(r){e.hierarchicalFacetsRefinements[r].forEach((function(i){n.push(function(e,t,n,r){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=n.split(a),u=c(r,(function(e){return e.name===t})),o=s.reduce((function(e,t){var n=e&&c(e.data,(function(e){return e.name===t}));return void 0!==n?n:e}),u),f=o&&o.count||0,h=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:f,exhaustive:h}}(e,r,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var r=e.numericRefinements[t];Object.keys(r).forEach((function(e){r[e].forEach((function(r){n.push({type:"numeric",attributeName:t,name:r,numericValue:r,operator:e})}))}))})),e.tagRefinements.forEach((function(e){n.push({type:"tag",attributeName:"_tags",name:e})})),n},e.exports=m},133:function(e,t,n){"use strict";function r(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||r&&i||!n)return 1;if(!r&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-t.index})),i.map((function(e){return e.value}))}},134:function(e,t,n){"use strict";var r=n(109);e.exports=function(e,t){var n=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=r(n,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},135:function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function c(){c.init.call(this)}e.exports=c,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==a&&e.removeListener("error",a),n([].slice.call(arguments))}var a;"error"!==t&&(a=function(n){e.removeListener(t,i),r(n)},e.once("error",a)),e.once(t,i)}))},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var u=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function h(e,t,n,r){var i,a,s,c;if(o(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=f(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,c=u,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var o=u.length,f=p(u,o);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},c.prototype.listeners=function(e){return d(this,e,!0)},c.prototype.rawListeners=function(e){return d(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},c.prototype.listenerCount=v,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},136:function(e,t,n){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},137:function(e,t,n){"use strict";e.exports="3.3.4"},160:function(e,t,n){"use strict";var r=n(161),i=n(130),a=n(132);function s(e,t,n){return new r(e,t,n)}s.version=n(137),s.AlgoliaSearchHelper=r,s.SearchParameters=i,s.SearchResults=a,e.exports=s},161:function(e,t,n){"use strict";var r=n(130),i=n(132),a=n(169),s=n(170),c=n(135),u=n(136),o=n(116),f=n(137);function h(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+f+")"),this.setClient(e);var i=n||{};i.index=t,this.state=r.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function l(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function m(){return this.state.page}u(h,c.EventEmitter),h.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},h.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},h.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},h.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,r=s._getQueries(n.index,n),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(r).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(n,e.results),state:n,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(r).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(n,e.results),n)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,n)}))},h.prototype.searchForFacetValues=function(e,t,n,r){var i="function"==typeof this.client.searchForFacetValues;if(!i&&"function"!=typeof this.client.initIndex)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var a=this.state.setQueryParameters(r||{}),c=a.isDisjunctiveFacet(e),u=s.getSearchForFacetQuery(e,t,n,a);this._currentNbQueries++;var o=this;return this.emit("searchForFacetValues",{state:a,facet:e,query:t}),(i?this.client.searchForFacetValues([{indexName:a.index,params:u}]):this.client.initIndex(a.index).searchForFacetValues(u)).then((function(t){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.isRefined=c?a.isDisjunctiveFacetRefined(e,t.value):a.isFacetRefined(e,t.value)})),t}),(function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e}))},h.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},h.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},h.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},h.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},h.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},h.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},h.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},h.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},h.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},h.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},h.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},h.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},h.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},h.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},h.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},h.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},h.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},h.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},h.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},h.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},h.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},h.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},h.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},h.prototype.setCurrentPage=l,h.prototype.setPage=l,h.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},h.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},h.prototype.setState=function(e){return this._change({state:r.make(e),isPageReset:!1}),this},h.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new r(e),this},h.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},h.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},h.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},h.prototype.hasTag=function(e){return this.state.isTagRefined(e)},h.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},h.prototype.getIndex=function(){return this.state.index},h.prototype.getCurrentPage=m,h.prototype.getPage=m,h.prototype.getTags=function(){return this.state.tagRefinements},h.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var n=this.state.getNumericRefinements(e);return Object.keys(n).forEach((function(e){var r=n[e];t.push({value:r,operator:e,type:"numeric"})})),t},h.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},h.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},h.prototype._search=function(e){var t=this.state,n=[],r=[];e.onlyWithDerivedHelpers||(r=s._getQueries(t.index,t),n.push({state:t,queriesCount:r.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var r=e.getModifiedState(t),i=s._getQueries(r.index,r);return n.push({state:r,queriesCount:i.length,helper:e}),e.emit("search",{state:r,results:e.lastResults}),i})),a=Array.prototype.concat.apply(r,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,n,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},h.prototype._dispatchAlgoliaResponse=function(e,t,n){if(!(t0},h.prototype._change=function(e){var t=e.state,n=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:n}))},h.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},h.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+f+")"),this.client=e),this},h.prototype.getClient=function(){return this.client},h.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},h.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},h.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=h},162:function(e,t,n){"use strict";e.exports=function(e,t){return e.filter((function(n,r){return t.indexOf(n)>-1&&e.indexOf(n)===r}))}},163:function(e,t,n){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},164:function(e,t,n){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},165:function(e,t,n){"use strict";var r=n(115),i=n(131),a=n(116),s={addRefinement:function(e,t,n){if(s.isRefined(e,t,n))return e;var i=""+n,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,r({},c,e)},removeRefinement:function(e,t,n){if(void 0===n)return s.clearRefinement(e,(function(e,n){return t===n}));var r=""+n;return s.clearRefinement(e,(function(e,n){return t===n&&r===e}))},toggleRefinement:function(e,t,n){if(void 0===n)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,n)?s.removeRefinement(e,t,n):s.addRefinement(e,t,n)},clearRefinement:function(e,t,n){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var r=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,n)}));return c.length!==s.length&&(r=!0),i[a]=c,i}),{});return r?s:e}},isRefined:function(e,t,n){var r=!!e[t]&&e[t].length>0;if(void 0===n||!r)return r;var i=""+n;return-1!==e[t].indexOf(i)}};e.exports=s},166:function(e,t,n){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},167:function(e,t,n){"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n0){var h=0;for(f=c;h0&&s[0].split(c).length>1&&n.push({indexName:e,params:i._getDisjunctiveFacetSearchParams(t,r,!0)})})),n},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(i._getHitsHierarchicalFacetsAttributes(e)),n=i._getFacetFilters(e),a=i._getNumericFilters(e),s={facets:t,tagFilters:i._getTagFilters(e)};return n.length>0&&(s.facetFilters=n),a.length>0&&(s.numericFilters=a),r({},e.getQueryParams(),s)},_getDisjunctiveFacetSearchParams:function(e,t,n){var a=i._getFacetFilters(e,t,n),s=i._getNumericFilters(e,t),c={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:i._getTagFilters(e),analytics:!1,clickAnalytics:!1},u=e.getHierarchicalFacetByName(t);return c.facets=u?i._getDisjunctiveHierarchicalFacetAttribute(e,u,n):t,s.length>0&&(c.numericFilters=s),a.length>0&&(c.facetFilters=a),r({},e.getQueryParams(),c)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return Object.keys(e.numericRefinements).forEach((function(r){var i=e.numericRefinements[r]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==r&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return r+e+t}));n.push(i)}else n.push(r+e+t)}))}))})),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,n){var r=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){r.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){r.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var n=s[e]||[];if(e!==t&&n&&0!==n.length){var i=[];n.forEach((function(t){i.push(e+":"+t)})),r.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),f=e._getHierarchicalFacetSeparator(o),h=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(f)||!h&&!0===n||h&&h.split(f).length===a.split(f).length)return;h?(u=h.split(f).length-1,a=h):(u=a.split(f).length-2,a=a.slice(0,a.lastIndexOf(f))),s=o.attributes[u]}else u=a.split(f).length-1,s=o.attributes[u];s&&r.push([s+":"+a])}})),r},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,n){var r=e.getHierarchicalRefinement(n.name)[0];if(!r)return t.push(n.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(n),a=r.split(i).length,s=n.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(!0===n){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(r).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(r).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,n,a){var s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof n&&(c.maxFacetHits=n),r({},i._getHitsSearchParams(s),c)}};e.exports=i},171:function(e,t,n){e.exports=function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n=JSON.stringify(e),r=a()[n];return Promise.all([r||t(),void 0!==r])})).then((function(e){var t=i(e,2),r=t[0],a=t[1];return Promise.all([r,a||n.miss(r)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function c(e){var t=a(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch((function(){return c({caches:t}).get(e,r,i)}))},set:function(e,r){return n.set(e,r).catch((function(){return c({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=r(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function f(e,t){return t?(Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e):e}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return n(n({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),r=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(0===r.length&&0===e?1:r.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,r,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var r=Array.isArray(e.data)?e.data:n(n({},e.data),t.data);return JSON.stringify(r)}}(r,i),u=function(e,t){var r=n(n({},e.headers),t.headers),i={};return Object.keys(r).forEach((function(e){var t=r[e];i[e.toLowerCase()]=t})),i}(e,i),o=r.method,f=r.method!==F?{}:n(n({},r.data),i.data),h=n(n(n({"x-algolia-agent":e.userAgent.value},e.queryParameters),f),i.queryParameters),l=0,m=function t(n,a){var f=n.pop();if(void 0===f)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:_(s)};var m={data:c,headers:u,method:o,url:O(f,r.path,h),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:f,triesLeft:n.length};return s.push(t),t},v={onSucess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var i=d(r);return r.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(f,y(f,r.isTimedOut?g:p))]).then((function(){return t(n,a)}))},onFail:function(e){throw d(e),function(e,t){var n=e.content,r=e.status,i=n;try{i=JSON.parse(n).message}catch(e){}return function(e,t,n){return{name:"ApiError",message:e,status:t,transporterStackTrace:n}}(i,r,t)}(e,_(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&0==~~n}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSucess(e):t.onFail(e)}(e,v)}))};return j(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function E(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}function O(e,t,n){var r=x(n),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return r.length&&(i+="?".concat(r)),i}function x(e){return Object.keys(e).map((function(t){return h("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function _(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return n(n({},e),{},{request:n(n({},e.request),{},{headers:n(n({},e.request.headers),t)})})}var N=function(e){var t=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?r:{}},queryParameters:function(){return e===l.WithinQueryParameters?r:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,f=e.queryParameters,h={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:f,hosts:o.map((function(e){return R(e)})),read:function(e,t){var n=m(t,h.timeouts.read),r=function(){return P(h,h.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,n)};if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:h.queryParameters,headers:h.headers}};return h.responsesCache.get(a,(function(){return h.requestsCache.get(a,(function(){return h.requestsCache.set(a,r()).then((function(e){return Promise.all([h.requestsCache.delete(a),e])}),(function(e){return Promise.all([h.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return h.responsesCache.set(a,e)}})},write:function(e,t){return P(h,h.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,h.timeouts.write))}};return h}(n(n({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:n(n(n({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:n(n({},r.queryParameters()),e.queryParameters)}));return f({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},H=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f({transporter:e.transporter,appId:e.appId,indexName:t},n.methods)}},A=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},r)}},S=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=r(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:C}}).searchForFacetValues(s,c,n(n({},i),u))})))}},Q=function(e){return function(t,n,r){return e.transporter.read({method:b,path:h("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},T=function(e){return function(t,n){return e.transporter.read({method:b,path:h("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},C=function(e){return function(t,n,r){return e.transporter.read({method:b,path:h("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},D=1,k=2,I=3;function q(e,t,r){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,i=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=i(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(i=I,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.8.4","-").concat(e)}),u()]}),userAgent:E("4.8.4").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(n(n(n({},a),r),{},{methods:{search:A,searchForFacetValues:S,multipleQueries:A,multipleSearchForFacetValues:S,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:T,searchForFacetValues:C,findAnswers:Q}})}}}}))}return q.version="4.8.4",q}()},82:function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=n(171),s=n.n(a),c=n(160),u=n.n(c),o=n(101),f=n(23),h=n(103),l=n(9),m=n(100),d=n(22),v=n(102),p=n(123),g=n(110),y=n(83),R=n.n(y);var F=function(e){var t=e.docsSearchVersionsHelpers,n=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return i.a.createElement("div",{className:Object(o.a)("col","col--3","padding-left--none",R.a.searchVersionColumn)},n.map((function(e){var r=e[0],a=e[1],s=n.length>1?r+": ":"";return i.a.createElement("select",{key:r,onChange:function(e){return t.setSearchVersion(r,e.target.value)},defaultValue:t.searchVersions[r],className:R.a.searchVersionInput},a.versions.map((function(e,t){return i.a.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))};t.default=function(){var e,t,n,a,c,y=Object(d.default)().siteConfig,b=(y=void 0===y?{}:y).themeConfig.algolia,j=(b=void 0===b?{}:b).appId,P=void 0===j?"BH4D9OD16A":j,E=b.apiKey,O=b.indexName,x=(e=Object(v.useAllDocsData)(),t=Object(r.useState)((function(){return Object.entries(e).reduce((function(e,t){var n,r=t[0],i=t[1];return Object.assign({},e,((n={})[r]=i.versions[0].name,n))}),{})})),n=t[0],a=t[1],c=Object.values(e).some((function(e){return e.versions.length>1})),{allDocsData:e,versioningEnabled:c,searchVersions:n,setSearchVersion:function(e,t){return a((function(n){var r;return Object.assign({},n,((r={})[e]=t,r))}))}}),_=Object(p.a)(),w=_.searchValue,N=_.updateSearchPath,H=Object(r.useState)(w),A=H[0],S=H[1],Q={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},T=Object(r.useReducer)((function(e,t){var n=t.type,r=t.value;switch(n){case"reset":return Q;case"loading":return Object.assign({},e,{loading:!0});case"update":return A!==r.query?e:Object.assign({},r,{items:0===r.lastPage?r.items:e.items.concat(r.items)});case"advance":var i=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:i?e.lastPage+1:e.lastPage,hasMore:i});default:return e}}),Q),C=T[0],D=T[1],k=s()(P,E),I=u()(k,O,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["docusaurus_tag"]});I.on("result",(function(e){var t=e.results,n=t.query,r=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==n&&r instanceof Array){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=r.map((function(e){var t=e.url,n=e._highlightResult.hierarchy,r=e._snippetResult,i=void 0===r?{}:r,a=new URL(t),s=a.pathname,u=a.hash,o=Object.keys(n).map((function(e){return c(n[e].value)}));return{title:o.pop(),url:s+u,summary:i.content?c(i.content.value)+"...":"",breadcrumbs:o}}));D({type:"update",value:{items:u,query:n,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else D({type:"reset"})}));var q,L,V=Object(r.useState)(null),B=V[0],M=V[1],z=Object(r.useRef)(0),J=Object(r.useRef)(l.a.canUseDOM&&new IntersectionObserver((function(e){var t=e[0],n=t.isIntersecting,r=t.boundingClientRect.y;n&&z.current>r&&D({type:"advance"}),z.current=r}),{threshold:1})),W=function(){return A?'Search results for "'+A+'"':"Search the documentation"},U=function(e){void 0===e&&(e=0),I.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Object.entries(x.searchVersions).forEach((function(e){var t=e[0],n=e[1];I.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+n)})),I.setQuery(A).setPage(e).search()};return Object(r.useEffect)((function(){if(B)return J.current.observe(B),function(){J.current.unobserve(B)}}),[B]),Object(r.useEffect)((function(){N(A),D({type:"reset"}),A&&(D({type:"loading"}),setTimeout((function(){U()}),300))}),[A,x.searchVersions]),Object(r.useEffect)((function(){C.lastPage&&0!==C.lastPage&&U(C.lastPage)}),[C.lastPage]),Object(r.useEffect)((function(){w&&w!==A&&S(w)}),[w]),i.a.createElement(g.a,{wrapperClassName:"search-page-wrapper"},i.a.createElement(f.a,null,i.a.createElement("title",null,Object(m.useTitleFormatter)(W())),i.a.createElement("meta",{property:"robots",content:"noindex, follow"})),i.a.createElement("div",{className:"container margin-vert--lg"},i.a.createElement("h1",null,W()),i.a.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},i.a.createElement("div",{className:Object(o.a)("col",R.a.searchQueryColumn,{"col--9":x.versioningEnabled,"col--12":!x.versioningEnabled})},i.a.createElement("input",{type:"search",name:"q",className:R.a.searchQueryInput,placeholder:"Type your search here","aria-label":"Search",onChange:function(e){return S(e.target.value)},value:A,autoComplete:"off",autoFocus:!0})),x.versioningEnabled&&i.a.createElement(F,{docsSearchVersionsHelpers:x})),i.a.createElement("div",{className:Object(o.a)("row","margin-vert--sm")},i.a.createElement("div",{className:Object(o.a)("col","col--8",R.a.searchResultsColumn)},!!C.totalResults&&i.a.createElement("strong",null,C.totalResults," ",(q=C.totalResults,L="document",q>1?L+"s":L)," found")),i.a.createElement("div",{className:Object(o.a)("col","col--4",R.a.searchLogoColumn)},i.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":"Search"},i.a.createElement("svg",{viewBox:"0 0 168 24",className:R.a.algoliaLogo,xmlns:"http://www.w3.org/2000/svg","aria-label":"Search by Algolia"},i.a.createElement("g",{fill:"none"},i.a.createElement("path",{className:R.a.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),i.a.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),i.a.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),C.items.length>0?i.a.createElement("section",null,C.items.map((function(e,t){var n=e.title,r=e.url,a=e.summary,s=e.breadcrumbs;return i.a.createElement("article",{key:t,className:R.a.searchResultItem},i.a.createElement(h.a,{to:r,className:R.a.searchResultItemHeading,dangerouslySetInnerHTML:{__html:n}}),s.length>0&&i.a.createElement("span",{className:R.a.searchResultItemPath},s.map((function(e,t){return i.a.createElement(i.a.Fragment,null,0!==t&&i.a.createElement("span",{className:R.a.searchResultItemPathSeparator},"\u203a"),i.a.createElement("span",{dangerouslySetInnerHTML:{__html:e}}))}))),a&&i.a.createElement("p",{className:R.a.searchResultItemSummary,dangerouslySetInnerHTML:{__html:a}}))}))):[A&&!C.loading&&i.a.createElement("p",{key:"no-results"},"No results were found"),!!C.loading&&i.a.createElement("div",{key:"spinner",className:R.a.loadingSpinner})],C.hasMore&&i.a.createElement("div",{className:R.a.loader,ref:M},i.a.createElement("span",null,"Fetching new results..."))))}}}]); \ No newline at end of file diff --git a/26.6ab32484.js.LICENSE.txt b/27.c9d23ccf.js.LICENSE.txt similarity index 100% rename from 26.6ab32484.js.LICENSE.txt rename to 27.c9d23ccf.js.LICENSE.txt diff --git a/27.dcd1b5f0.js b/27.dcd1b5f0.js deleted file mode 100644 index f5fc212d2..000000000 --- a/27.dcd1b5f0.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27,30],{116:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(109);t.default=function(){return r.a.createElement(o.a,{title:"Page Not Found"},r.a.createElement("main",{className:"container margin-vert--xl"},r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col col--6 col--offset-3"},r.a.createElement("h1",{className:"hero__title"},"Page Not Found"),r.a.createElement("p",null,"We could not find what you were looking for."),r.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}},155:function(e,t,n){"use strict";const a=(e,{target:t=document.body}={})=>{const n=document.createElement("textarea"),a=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const r=document.getSelection();let o=!1;r.rangeCount>0&&(o=r.getRangeAt(0)),t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch(l){}return n.remove(),o&&(r.removeAllRanges(),r.addRange(o)),a&&a.focus(),c};e.exports=a,e.exports.default=a},156:function(e,t){function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,o]=t;if(a&&o){a=parseInt(a),o=parseInt(o);const e=a0&&e[n-1]===t?e:e.concat(t)},M=function(e,t){var n=e.plain,a=Object.create(null),r=e.styles.reduce((function(e,n){var a=n.languages,r=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=I({},e[t],r);e[t]=n})),e}),a);return r.root=n,r.plain=I({},n,{backgroundColor:null}),r};function R(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}var A=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),_(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?M(e.theme,e.language):void 0;return t.themeDict=n})),_(this,"getLineProps",(function(e){var n=e.key,a=e.className,r=e.style,o=I({},R(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(o.style=c.plain),void 0!==r&&(o.style=void 0!==o.style?I({},o.style,r):r),void 0!==n&&(o.key=n),a&&(o.className+=" "+a),o})),_(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,r=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===r&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===r&&!a)return o[n[0]];var c=a?{display:"inline-block"}:{},l=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[c].concat(l))}})),_(this,"getTokenProps",(function(e){var n=e.key,a=e.className,r=e.style,o=e.token,c=I({},R(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==r&&(c.style=void 0!==c.style?I({},c.style,r):r),void 0!==n&&(c.key=n),a&&(c.className+=" "+a),c}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,r=e.children,o=this.getThemeDict(this.props),c=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],a=[0],r=[e.length],o=0,c=0,l=[],i=[l];c>-1;){for(;(o=a[c]++)0?u:["plain"],s=p):(u=B(u,p.type),p.alias&&(u=B(u,p.alias)),s=p.content),"string"==typeof s){var m=s.split(D),d=m.length;l.push({types:u,content:m[0]});for(var b=1;b0}))}o&&q.test(o)&&(g=o.match(q)[1]);var k=n&&n.replace(/language-/,"");!k&&c.defaultLanguage&&(k=c.defaultLanguage);var E=j.replace(/\n$/,"");if(0===h.length&&void 0!==k){for(var N,C="",x=function(e){switch(e){case"js":case"javascript":case"ts":case"typescript":return Y(["js","jsBlock"]);case"jsx":case"tsx":return Y(["js","jsBlock","jsx"]);case"html":return Y(["js","jsBlock","html"]);case"python":case"py":return Y(["python"]);default:return Y()}}(k),P=j.replace(/\n$/,"").split("\n"),w=0;w=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),u=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,b=p["".concat(c,".").concat(d)]||p[d]||m[d]||o;return n?r.a.createElement(b,l(l({ref:t},s),{},{components:n})):r.a.createElement(b,l({ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:a,c[1]=l;for(var s=2;s{const n=document.createElement("textarea"),a=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const r=document.getSelection();let o=!1;r.rangeCount>0&&(o=r.getRangeAt(0)),t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch(l){}return n.remove(),o&&(r.removeAllRanges(),r.addRange(o)),a&&a.focus(),c};e.exports=a,e.exports.default=a},157:function(e,t){function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,o]=t;if(a&&o){a=parseInt(a),o=parseInt(o);const e=a0&&e[n-1]===t?e:e.concat(t)},M=function(e,t){var n=e.plain,a=Object.create(null),r=e.styles.reduce((function(e,n){var a=n.languages,r=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=I({},e[t],r);e[t]=n})),e}),a);return r.root=n,r.plain=I({},n,{backgroundColor:null}),r};function R(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}var A=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),_(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?M(e.theme,e.language):void 0;return t.themeDict=n})),_(this,"getLineProps",(function(e){var n=e.key,a=e.className,r=e.style,o=I({},R(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(o.style=c.plain),void 0!==r&&(o.style=void 0!==o.style?I({},o.style,r):r),void 0!==n&&(o.key=n),a&&(o.className+=" "+a),o})),_(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,r=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===r&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===r&&!a)return o[n[0]];var c=a?{display:"inline-block"}:{},l=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[c].concat(l))}})),_(this,"getTokenProps",(function(e){var n=e.key,a=e.className,r=e.style,o=e.token,c=I({},R(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==r&&(c.style=void 0!==c.style?I({},c.style,r):r),void 0!==n&&(c.key=n),a&&(c.className+=" "+a),c}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,r=e.children,o=this.getThemeDict(this.props),c=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],a=[0],r=[e.length],o=0,c=0,l=[],i=[l];c>-1;){for(;(o=a[c]++)0?u:["plain"],s=p):(u=B(u,p.type),p.alias&&(u=B(u,p.alias)),s=p.content),"string"==typeof s){var m=s.split(D),d=m.length;l.push({types:u,content:m[0]});for(var b=1;b0}))}o&&q.test(o)&&(g=o.match(q)[1]);var k=n&&n.replace(/language-/,"");!k&&c.defaultLanguage&&(k=c.defaultLanguage);var E=j.replace(/\n$/,"");if(0===h.length&&void 0!==k){for(var N,C="",x=function(e){switch(e){case"js":case"javascript":case"ts":case"typescript":return Y(["js","jsBlock"]);case"jsx":case"tsx":return Y(["js","jsBlock","jsx"]);case"html":return Y(["js","jsBlock","html"]);case"python":case"py":return Y(["python"]);default:return Y()}}(k),P=j.replace(/\n$/,"").split("\n"),w=0;w=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),u=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,b=p["".concat(c,".").concat(d)]||p[d]||m[d]||o;return n?r.a.createElement(b,l(l({ref:t},s),{},{components:n})):r.a.createElement(b,l({ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:a,c[1]=l;for(var s=2;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var C=null;function N(e){var t=e.event,r=e.nextState,n=void 0===r?{}:r,o=e.props,a=e.query,c=e.refresh,i=e.store,l=D(e,["event","nextState","props","query","refresh","store"]);if(o.onInput)return Promise.resolve(o.onInput(P({query:a,refresh:c,state:i.getState()},l)));C&&o.environment.clearTimeout(C);var s,u=l.setCollections,f=l.setIsOpen,m=l.setQuery,p=l.setSelectedItemId,h=l.setStatus;return m(a),p(o.defaultSelectedItemId),0===a.length&&!1===o.openOnFocus?(h("idle"),u(i.getState().collections.map((function(e){return P(P({},e),{},{items:[]})}))),f(null!==(s=n.isOpen)&&void 0!==s?s:o.shouldPanelShow({state:i.getState()})),Promise.resolve()):(h("loading"),C=o.environment.setTimeout((function(){h("stalled")}),o.stallThreshold),o.getSources(P({query:a,refresh:c,state:i.getState()},l)).then((function(e){return h("loading"),Promise.all(e.map((function(e){return Promise.resolve(e.getItems(P({query:a,refresh:c,state:i.getState()},l))).then((function(t){return Array.isArray(t),"The `getItems` function must return an array of items but returned type ".concat(JSON.stringify(w(t)),":\n\n").concat(JSON.stringify(t,null,2)),{source:e,items:t}}))}))).then((function(e){var r;h("idle"),u(e),f(null!==(r=n.isOpen)&&void 0!==r?r:0===a.length&&o.openOnFocus||o.shouldPanelShow({state:i.getState()}));var s=E(i.getState());if(null!==i.getState().selectedItemId&&s){var m=s.item,p=s.itemInputValue,d=s.itemUrl,v=s.source;v.onHighlight(P({event:t,item:m,itemInputValue:p,itemUrl:d,refresh:c,source:v,state:i.getState()},l))}})).catch((function(e){throw h("error"),e})).finally((function(){C&&o.environment.clearTimeout(C)}))})))}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function H(e,t){return e===t||e.contains(t)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function L(e){var t=e.props,r=e.refresh,n=e.store,o=M(e,["props","refresh","store"]);return{getEnvironmentProps:function(e){return{onTouchStart:function(r){!1!==n.getState().isOpen&&r.target!==e.inputElement&&(!1===[e.formElement,e.panelElement].some((function(e){return H(e,r.target)||H(e,t.environment.document.activeElement)}))&&n.dispatch("blur",null))},onTouchMove:function(r){!1!==n.getState().isOpen&&e.inputElement===t.environment.document.activeElement&&r.target!==e.inputElement&&e.inputElement.blur()}}},getRootProps:function(e){return T({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return T({action:"",noValidate:!0,role:"search",onSubmit:function(a){var c;a.preventDefault(),t.onSubmit(T({event:a,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(c=e.inputElement)||void 0===c||c.blur()},onReset:function(a){var c;a.preventDefault(),t.onReset(T({event:a,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(c=e.inputElement)||void 0===c||c.focus()}},M(e,["inputElement"]))},getLabelProps:function(e){return T({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},e)},getInputProps:function(e){function a(e){(t.openOnFocus||n.getState().query.length>0)&&N(T({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var c="ontouchstart"in t.environment,i=e||{},l=(i.inputElement,i.maxLength),s=void 0===l?512:l,u=M(i,["inputElement","maxLength"]),f=E(n.getState());return T({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().selectedItemId?"".concat(t.id,"-item-").concat(n.getState().selectedItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:null!=f&&f.itemUrl?"go":"search",spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){N(T({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,a=q(e,["event","props","refresh","store"]);if("ArrowUp"===t.key||"ArrowDown"===t.key){t.preventDefault(),o.dispatch(t.key,null);var c=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().selectedItemId));c&&(c.scrollIntoViewIfNeeded?c.scrollIntoViewIfNeeded(!1):c.scrollIntoView(!1));var i=E(o.getState());if(null!==o.getState().selectedItemId&&i){var l=i.item,s=i.itemInputValue,u=i.itemUrl,f=i.source;f.onHighlight(x({event:t,item:l,itemInputValue:s,itemUrl:u,refresh:n,source:f,state:o.getState()},a))}}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null);else if("Enter"===t.key){if(null===o.getState().selectedItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return;t.preventDefault();var m=E(o.getState()),p=m.item,h=m.itemInputValue,d=m.itemUrl,v=m.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),r.navigator.navigateNewTab({itemUrl:d,item:p,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),r.navigator.navigateNewWindow({itemUrl:d,item:p,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),void r.navigator.navigate({itemUrl:d,item:p,state:o.getState()});N(x({event:t,nextState:{isOpen:!1},props:r,query:h,refresh:n,store:o},a)).then((function(){v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a))}))}}}(T({event:e,props:t,refresh:r,store:n},o))},onFocus:a,onBlur:function(){c||n.dispatch("blur",null)},onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||a(r)}},u)},getPanelProps:function(e){return T({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){return T({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},e)},getItemProps:function(e){var a=e.item,c=e.source,i=M(e,["item","source"]);return T({id:"".concat(t.id,"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().selectedItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().selectedItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=E(n.getState());if(null!==n.getState().selectedItemId&&t){var c=t.item,i=t.itemInputValue,l=t.itemUrl,s=t.source;s.onHighlight(T({event:e,item:c,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():N(T({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(T({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},i)}}}function F(e){var t=e.state;return!1===t.isOpen||null===t.selectedItemId?null:E(t).itemInputValue||null}function U(e,t,r,n){if(e<0&&(null===t||null!==n&&0===t))return r+e;var o=(null===t?-1:t)+e;return o<=-1||o>=r?null===n?null:0:o}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t0});case"blur":return t.props.debug?e:z(z({},e),{},{isOpen:!1,selectedItemId:null});case"mousemove":return z(z({},e),{},{selectedItemId:t.payload});case"mouseleave":return z(z({},e),{},{selectedItemId:t.props.defaultSelectedItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var t=1;t0}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(f++),plugins:o,initialState:O({selectedItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(y(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return v(e,r)}))).then((function(e){return c(e)})).then((function(e){return e.map((function(e){return O(O({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onHighlight:function(r){e.onHighlight(r),t.forEach((function(e){var t;return null===(t=e.onHighlight)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:O({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}(e,t),n=a(J,r),o=function(e){var t=e.store;return{setSelectedItemId:function(e){t.dispatch("setSelectedItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var r=0,n=e.map((function(e){return l(l({},e),{},{items:c(e.items).map((function(e){return l(l({},e),{},{__autocomplete_id:r++})}))})}));t.dispatch("setCollections",n)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:n}),i=L($({props:r,refresh:s,store:n},o));function s(){return N($({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:r,query:n.getState().query,refresh:s,store:n},o))}return r.plugins.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,$($({},o),{},{onSelect:function(e){t.push({onSelect:e})},onHighlight:function(e){t.push({onHighlight:e})}}))})),$($({refresh:s},i),o)}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&te.a.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},te.a.createElement("p",{className:"DocSearch-Help"},"Try searching for:"),te.a.createElement("ul",null,t.slice(0,3).reduce((function(t,r){return[].concat(se(t),[te.a.createElement("li",{key:r},te.a.createElement("button",{className:"DocSearch-Prefill",key:r,onClick:function(){e.setQuery(r.toLowerCase()+" "),e.refresh(),e.inputRef.current.focus()}},r))])}),[]))),te.a.createElement("p",{className:"DocSearch-Help"},"Believe this query should return results?"," ",te.a.createElement("a",{href:"https://github.com/algolia/docsearch-configs/issues/new?template=Missing_results.md&title=[".concat(e.indexName,']+Missing+results+for+query+"').concat(e.state.query,'"'),target:"_blank",rel:"noopener noreferrer"},"Let us know"),"."))}function me(e){switch(e.type){case"lvl1":return te.a.createElement(pe,null);case"content":return te.a.createElement(de,null);default:return te.a.createElement(he,null)}}function pe(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function he(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function de(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function ve(){return te.a.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},te.a.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),te.a.createElement("path",{d:"M8 17l-6-6 6-6"})))}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Se(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function Ee(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,a=Oe(e,["hit","attribute","tagName"]);return Object(ee.createElement)(o,ge(ge({},a),{},{dangerouslySetInnerHTML:{__html:Se(t,"_snippetResult.".concat(r,".value"))||Se(t,r)}}))}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(l){o=!0,a=l}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}));return e.state.query?!1===t?te.a.createElement(fe,e):te.a.createElement(Ne,e):te.a.createElement(He,Re({},e,{hasCollections:t}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function _e(){return te.a.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},te.a.createElement("g",{fill:"none",fillRule:"evenodd"},te.a.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},te.a.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),te.a.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},te.a.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var Me=r(123);function Le(){return(Le=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ve(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function ze(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=Ve(t),a=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,Ue(t,["_highlightResult","_snippetResult"])),c=a.findIndex((function(e){return e.objectID===r.objectID}));c>-1&&a.splice(c,1),a.unshift(r),a=a.slice(0,n),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function Be(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}");return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),n=o()[r];return Promise.all([n||t(),void 0!==n])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const a=o();return a[JSON.stringify(e)]=r,n().setItem(t,JSON.stringify(a)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Je(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Je({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Je({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Je({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Je({caches:t}).clear()))}}function Ke(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);const c=n(),i=o&&o.miss||(()=>Promise.resolve());return c.then((e=>i(e))).then((()=>c))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function $e(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function We(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Qe(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Ye="4.8.4",Ge={WithinQueryParameters:0,WithinHeaders:1};function Xe(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ze={Read:1,Write:2,Any:3},et=1,tt=2,rt=3,nt=12e4;function ot(e,t=et){return{...e,status:t,lastUpdate:Date.now()}}function at(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ze.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ze.Any}}const ct="GET",it="POST";function lt(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(ot(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===et||Date.now()-e.lastUpdate>nt}(e))),n=e.filter((e=>function(e){return e.status===rt&&Date.now()-e.lastUpdate<=nt}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>at(e))):t}}))}function st(e,t,r,n){const o=[],a=function(e,t){if(e.method===ct||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),c=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),i=r.method,l=r.method!==ct?{}:{...r.data,...n.data},s={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let u=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:pt(o)};const p={data:a,headers:c,method:i,url:ft(m,r.path,s),connectTimeout:l(u,e.timeouts.connect),responseTimeout:l(u,n.timeout)},h=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSucess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=h(r);return r.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",ht(n)),e.hostsCache.set(m,ot(m,r.isTimedOut?rt:tt))]).then((()=>f(t,l)))},onFail(e){throw h(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,pt(o))}};return e.requester.send(p).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSucess(e):t.onFail(e))(e,d)))};return lt(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function ut(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function ft(e,t,r){const n=mt(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function mt(e){return Object.keys(e).map((t=>{return Qe("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function pt(e){return e.map((e=>ht(e)))}function ht(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const dt=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ge.WithinHeaders?n:{},queryParameters:()=>e===Ge.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ge.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,hosts:l,queryParameters:s,headers:u}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,headers:u,queryParameters:s,hosts:l.map((e=>at(e))),read(e,t){const r=Xe(t,f.timeouts.read),n=()=>st(f,f.hosts.filter((e=>0!=(e.accept&Ze.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>st(f,f.hosts.filter((e=>0!=(e.accept&Ze.Write))),e,Xe(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ze.Read},{url:`${t}.algolia.net`,accept:Ze.Write}].concat($e([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}});return We({transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))},e.methods)},vt=e=>(t,r={})=>We({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),yt=e=>(t,r)=>{const n=t.map((e=>({...e,params:mt(e.params||{})})));return e.transporter.read({method:it,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},gt=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...a}=t.params;return vt(e)(t.indexName,{methods:{searchForFacetValues:St}}).searchForFacetValues(n,o,{...r,...a})}))),bt=e=>(t,r,n)=>e.transporter.read({method:it,path:Qe("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Ot=e=>(t,r)=>e.transporter.read({method:it,path:Qe("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),St=e=>(t,r,n)=>e.transporter.read({method:it,path:Qe("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Et=1,wt=2,jt=3;function Pt(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let a;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===a&&(clearTimeout(o),a=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(a),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(a),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=jt,{debug:(e,t)=>(Et>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(wt>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Ke(),requestsCache:Ke({serializable:!1}),hostsCache:Je({caches:[Be({key:`4.8.4-${e}`}),Ke()]}),userAgent:ut(Ye).add({segment:"Browser",version:"lite"}),authMode:Ge.WithinQueryParameters};var o;return dt({...n,...r,methods:{search:yt,searchForFacetValues:gt,multipleQueries:yt,multipleSearchForFacetValues:gt,initIndex:e=>t=>vt(e)(t,{methods:{search:Ot,searchForFacetValues:St,findAnswers:bt}})}})}Pt.version=Ye;var It=Pt,Dt="3.0.0-alpha.32";function Ct(){}function Nt(e){return e}function kt(e,t){return e.reduce((function(e,r){var n=t(r);return e.hasOwnProperty(n)||(e[n]=[]),e[n].length<5&&e[n].push(r),e}),{})}function xt(){return(xt=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r",highlightPostTag:"",hitsPerPage:20},i)}]}).catch((function(e){throw"RetryError"===e.name&&a("error"),e})).then((function(e){var t=e[0].hits,o=e[0].nbHits,a=kt(t,(function(e){return e.hierarchy.lvl0}));return r.context.searchSuggestions.length0&&(z(),A.current&&A.current.focus())}),[R,z]),te.a.useEffect((function(){function e(){if(N.current){var e=.01*window.innerHeight;N.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),te.a.createElement("div",xt({ref:C},V({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===I.status&&"DocSearch-Container--Stalled","error"===I.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),onMouseDown:function(e){e.target===e.currentTarget&&s()}}),te.a.createElement("div",{className:"DocSearch-Modal",ref:N},te.a.createElement("header",{className:"DocSearch-SearchBar",ref:k},te.a.createElement(Fe,xt({},F,{state:I,autoFocus:0===R.length,onClose:s,inputRef:A,isFromSelection:Boolean(R)&&R===H}))),te.a.createElement("div",{className:"DocSearch-Dropdown",ref:x},te.a.createElement(Te,xt({},F,{indexName:o,state:I,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:E,recentSearches:M,favoriteSearches:_,onItemClick:function(e){L(e),s()},inputRef:A}))),te.a.createElement("footer",{className:"DocSearch-Footer"},te.a.createElement(ne,null))))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{180:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=t.initialState;return{getState:function(){return r},dispatch:function(a,c){var i=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var C=null;function N(e){var t=e.event,r=e.nextState,n=void 0===r?{}:r,o=e.props,a=e.query,c=e.refresh,i=e.store,l=D(e,["event","nextState","props","query","refresh","store"]);if(o.onInput)return Promise.resolve(o.onInput(P({query:a,refresh:c,state:i.getState()},l)));C&&o.environment.clearTimeout(C);var s,u=l.setCollections,f=l.setIsOpen,m=l.setQuery,p=l.setSelectedItemId,h=l.setStatus;return m(a),p(o.defaultSelectedItemId),0===a.length&&!1===o.openOnFocus?(h("idle"),u(i.getState().collections.map((function(e){return P(P({},e),{},{items:[]})}))),f(null!==(s=n.isOpen)&&void 0!==s?s:o.shouldPanelShow({state:i.getState()})),Promise.resolve()):(h("loading"),C=o.environment.setTimeout((function(){h("stalled")}),o.stallThreshold),o.getSources(P({query:a,refresh:c,state:i.getState()},l)).then((function(e){return h("loading"),Promise.all(e.map((function(e){return Promise.resolve(e.getItems(P({query:a,refresh:c,state:i.getState()},l))).then((function(t){return Array.isArray(t),"The `getItems` function must return an array of items but returned type ".concat(JSON.stringify(w(t)),":\n\n").concat(JSON.stringify(t,null,2)),{source:e,items:t}}))}))).then((function(e){var r;h("idle"),u(e),f(null!==(r=n.isOpen)&&void 0!==r?r:0===a.length&&o.openOnFocus||o.shouldPanelShow({state:i.getState()}));var s=E(i.getState());if(null!==i.getState().selectedItemId&&s){var m=s.item,p=s.itemInputValue,d=s.itemUrl,v=s.source;v.onHighlight(P({event:t,item:m,itemInputValue:p,itemUrl:d,refresh:c,source:v,state:i.getState()},l))}})).catch((function(e){throw h("error"),e})).finally((function(){C&&o.environment.clearTimeout(C)}))})))}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function H(e,t){return e===t||e.contains(t)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function L(e){var t=e.props,r=e.refresh,n=e.store,o=M(e,["props","refresh","store"]);return{getEnvironmentProps:function(e){return{onTouchStart:function(r){!1!==n.getState().isOpen&&r.target!==e.inputElement&&(!1===[e.formElement,e.panelElement].some((function(e){return H(e,r.target)||H(e,t.environment.document.activeElement)}))&&n.dispatch("blur",null))},onTouchMove:function(r){!1!==n.getState().isOpen&&e.inputElement===t.environment.document.activeElement&&r.target!==e.inputElement&&e.inputElement.blur()}}},getRootProps:function(e){return T({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return T({action:"",noValidate:!0,role:"search",onSubmit:function(a){var c;a.preventDefault(),t.onSubmit(T({event:a,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(c=e.inputElement)||void 0===c||c.blur()},onReset:function(a){var c;a.preventDefault(),t.onReset(T({event:a,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(c=e.inputElement)||void 0===c||c.focus()}},M(e,["inputElement"]))},getLabelProps:function(e){return T({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},e)},getInputProps:function(e){function a(e){(t.openOnFocus||n.getState().query.length>0)&&N(T({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var c="ontouchstart"in t.environment,i=e||{},l=(i.inputElement,i.maxLength),s=void 0===l?512:l,u=M(i,["inputElement","maxLength"]),f=E(n.getState());return T({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().selectedItemId?"".concat(t.id,"-item-").concat(n.getState().selectedItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:null!=f&&f.itemUrl?"go":"search",spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){N(T({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,a=q(e,["event","props","refresh","store"]);if("ArrowUp"===t.key||"ArrowDown"===t.key){t.preventDefault(),o.dispatch(t.key,null);var c=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().selectedItemId));c&&(c.scrollIntoViewIfNeeded?c.scrollIntoViewIfNeeded(!1):c.scrollIntoView(!1));var i=E(o.getState());if(null!==o.getState().selectedItemId&&i){var l=i.item,s=i.itemInputValue,u=i.itemUrl,f=i.source;f.onHighlight(x({event:t,item:l,itemInputValue:s,itemUrl:u,refresh:n,source:f,state:o.getState()},a))}}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null);else if("Enter"===t.key){if(null===o.getState().selectedItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return;t.preventDefault();var m=E(o.getState()),p=m.item,h=m.itemInputValue,d=m.itemUrl,v=m.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),r.navigator.navigateNewTab({itemUrl:d,item:p,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),r.navigator.navigateNewWindow({itemUrl:d,item:p,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),void r.navigator.navigate({itemUrl:d,item:p,state:o.getState()});N(x({event:t,nextState:{isOpen:!1},props:r,query:h,refresh:n,store:o},a)).then((function(){v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a))}))}}}(T({event:e,props:t,refresh:r,store:n},o))},onFocus:a,onBlur:function(){c||n.dispatch("blur",null)},onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||a(r)}},u)},getPanelProps:function(e){return T({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){return T({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},e)},getItemProps:function(e){var a=e.item,c=e.source,i=M(e,["item","source"]);return T({id:"".concat(t.id,"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().selectedItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().selectedItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=E(n.getState());if(null!==n.getState().selectedItemId&&t){var c=t.item,i=t.itemInputValue,l=t.itemUrl,s=t.source;s.onHighlight(T({event:e,item:c,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():N(T({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(T({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},i)}}}function F(e){var t=e.state;return!1===t.isOpen||null===t.selectedItemId?null:E(t).itemInputValue||null}function U(e,t,r,n){if(e<0&&(null===t||null!==n&&0===t))return r+e;var o=(null===t?-1:t)+e;return o<=-1||o>=r?null===n?null:0:o}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t0});case"blur":return t.props.debug?e:z(z({},e),{},{isOpen:!1,selectedItemId:null});case"mousemove":return z(z({},e),{},{selectedItemId:t.payload});case"mouseleave":return z(z({},e),{},{selectedItemId:t.props.defaultSelectedItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var t=1;t0}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(f++),plugins:o,initialState:O({selectedItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(y(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return v(e,r)}))).then((function(e){return c(e)})).then((function(e){return e.map((function(e){return O(O({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onHighlight:function(r){e.onHighlight(r),t.forEach((function(e){var t;return null===(t=e.onHighlight)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:O({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}(e,t),n=a(J,r),o=function(e){var t=e.store;return{setSelectedItemId:function(e){t.dispatch("setSelectedItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var r=0,n=e.map((function(e){return l(l({},e),{},{items:c(e.items).map((function(e){return l(l({},e),{},{__autocomplete_id:r++})}))})}));t.dispatch("setCollections",n)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:n}),i=L($({props:r,refresh:s,store:n},o));function s(){return N($({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:r,query:n.getState().query,refresh:s,store:n},o))}return r.plugins.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,$($({},o),{},{onSelect:function(e){t.push({onSelect:e})},onHighlight:function(e){t.push({onHighlight:e})}}))})),$($({refresh:s},i),o)}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&te.a.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},te.a.createElement("p",{className:"DocSearch-Help"},"Try searching for:"),te.a.createElement("ul",null,t.slice(0,3).reduce((function(t,r){return[].concat(se(t),[te.a.createElement("li",{key:r},te.a.createElement("button",{className:"DocSearch-Prefill",key:r,onClick:function(){e.setQuery(r.toLowerCase()+" "),e.refresh(),e.inputRef.current.focus()}},r))])}),[]))),te.a.createElement("p",{className:"DocSearch-Help"},"Believe this query should return results?"," ",te.a.createElement("a",{href:"https://github.com/algolia/docsearch-configs/issues/new?template=Missing_results.md&title=[".concat(e.indexName,']+Missing+results+for+query+"').concat(e.state.query,'"'),target:"_blank",rel:"noopener noreferrer"},"Let us know"),"."))}function me(e){switch(e.type){case"lvl1":return te.a.createElement(pe,null);case"content":return te.a.createElement(de,null);default:return te.a.createElement(he,null)}}function pe(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function he(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function de(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function ve(){return te.a.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},te.a.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),te.a.createElement("path",{d:"M8 17l-6-6 6-6"})))}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Se(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function Ee(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,a=Oe(e,["hit","attribute","tagName"]);return Object(ee.createElement)(o,ge(ge({},a),{},{dangerouslySetInnerHTML:{__html:Se(t,"_snippetResult.".concat(r,".value"))||Se(t,r)}}))}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(l){o=!0,a=l}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}));return e.state.query?!1===t?te.a.createElement(fe,e):te.a.createElement(Ne,e):te.a.createElement(He,Re({},e,{hasCollections:t}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function _e(){return te.a.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},te.a.createElement("g",{fill:"none",fillRule:"evenodd"},te.a.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},te.a.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),te.a.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},te.a.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var Me=r(124);function Le(){return(Le=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ve(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function ze(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=Ve(t),a=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,Ue(t,["_highlightResult","_snippetResult"])),c=a.findIndex((function(e){return e.objectID===r.objectID}));c>-1&&a.splice(c,1),a.unshift(r),a=a.slice(0,n),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function Be(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}");return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),n=o()[r];return Promise.all([n||t(),void 0!==n])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const a=o();return a[JSON.stringify(e)]=r,n().setItem(t,JSON.stringify(a)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Je(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Je({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Je({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Je({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Je({caches:t}).clear()))}}function Ke(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);const c=n(),i=o&&o.miss||(()=>Promise.resolve());return c.then((e=>i(e))).then((()=>c))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function $e(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function We(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Qe(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Ye="4.8.4",Ge={WithinQueryParameters:0,WithinHeaders:1};function Xe(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ze={Read:1,Write:2,Any:3},et=1,tt=2,rt=3,nt=12e4;function ot(e,t=et){return{...e,status:t,lastUpdate:Date.now()}}function at(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ze.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ze.Any}}const ct="GET",it="POST";function lt(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(ot(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===et||Date.now()-e.lastUpdate>nt}(e))),n=e.filter((e=>function(e){return e.status===rt&&Date.now()-e.lastUpdate<=nt}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>at(e))):t}}))}function st(e,t,r,n){const o=[],a=function(e,t){if(e.method===ct||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),c=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),i=r.method,l=r.method!==ct?{}:{...r.data,...n.data},s={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let u=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:pt(o)};const p={data:a,headers:c,method:i,url:ft(m,r.path,s),connectTimeout:l(u,e.timeouts.connect),responseTimeout:l(u,n.timeout)},h=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSucess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=h(r);return r.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",ht(n)),e.hostsCache.set(m,ot(m,r.isTimedOut?rt:tt))]).then((()=>f(t,l)))},onFail(e){throw h(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,pt(o))}};return e.requester.send(p).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSucess(e):t.onFail(e))(e,d)))};return lt(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function ut(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function ft(e,t,r){const n=mt(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function mt(e){return Object.keys(e).map((t=>{return Qe("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function pt(e){return e.map((e=>ht(e)))}function ht(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const dt=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ge.WithinHeaders?n:{},queryParameters:()=>e===Ge.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ge.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,hosts:l,queryParameters:s,headers:u}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,headers:u,queryParameters:s,hosts:l.map((e=>at(e))),read(e,t){const r=Xe(t,f.timeouts.read),n=()=>st(f,f.hosts.filter((e=>0!=(e.accept&Ze.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>st(f,f.hosts.filter((e=>0!=(e.accept&Ze.Write))),e,Xe(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ze.Read},{url:`${t}.algolia.net`,accept:Ze.Write}].concat($e([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}});return We({transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))},e.methods)},vt=e=>(t,r={})=>We({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),yt=e=>(t,r)=>{const n=t.map((e=>({...e,params:mt(e.params||{})})));return e.transporter.read({method:it,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},gt=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...a}=t.params;return vt(e)(t.indexName,{methods:{searchForFacetValues:St}}).searchForFacetValues(n,o,{...r,...a})}))),bt=e=>(t,r,n)=>e.transporter.read({method:it,path:Qe("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Ot=e=>(t,r)=>e.transporter.read({method:it,path:Qe("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),St=e=>(t,r,n)=>e.transporter.read({method:it,path:Qe("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Et=1,wt=2,jt=3;function Pt(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let a;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===a&&(clearTimeout(o),a=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(a),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(a),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=jt,{debug:(e,t)=>(Et>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(wt>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Ke(),requestsCache:Ke({serializable:!1}),hostsCache:Je({caches:[Be({key:`4.8.4-${e}`}),Ke()]}),userAgent:ut(Ye).add({segment:"Browser",version:"lite"}),authMode:Ge.WithinQueryParameters};var o;return dt({...n,...r,methods:{search:yt,searchForFacetValues:gt,multipleQueries:yt,multipleSearchForFacetValues:gt,initIndex:e=>t=>vt(e)(t,{methods:{search:Ot,searchForFacetValues:St,findAnswers:bt}})}})}Pt.version=Ye;var It=Pt,Dt="3.0.0-alpha.32";function Ct(){}function Nt(e){return e}function kt(e,t){return e.reduce((function(e,r){var n=t(r);return e.hasOwnProperty(n)||(e[n]=[]),e[n].length<5&&e[n].push(r),e}),{})}function xt(){return(xt=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r",highlightPostTag:"",hitsPerPage:20},i)}]}).catch((function(e){throw"RetryError"===e.name&&a("error"),e})).then((function(e){var t=e[0].hits,o=e[0].nbHits,a=kt(t,(function(e){return e.hierarchy.lvl0}));return r.context.searchSuggestions.length0&&(z(),A.current&&A.current.focus())}),[R,z]),te.a.useEffect((function(){function e(){if(N.current){var e=.01*window.innerHeight;N.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),te.a.createElement("div",xt({ref:C},V({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===I.status&&"DocSearch-Container--Stalled","error"===I.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),onMouseDown:function(e){e.target===e.currentTarget&&s()}}),te.a.createElement("div",{className:"DocSearch-Modal",ref:N},te.a.createElement("header",{className:"DocSearch-SearchBar",ref:k},te.a.createElement(Fe,xt({},F,{state:I,autoFocus:0===R.length,onClose:s,inputRef:A,isFromSelection:Boolean(R)&&R===H}))),te.a.createElement("div",{className:"DocSearch-Dropdown",ref:x},te.a.createElement(Te,xt({},F,{indexName:o,state:I,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:E,recentSearches:M,favoriteSearches:_,onItemClick:function(e){L(e),s()},inputRef:A}))),te.a.createElement("footer",{className:"DocSearch-Footer"},te.a.createElement(ne,null))))}}}]); \ No newline at end of file diff --git a/29.e2c6dc2b.js b/30.d830e073.js similarity index 68% rename from 29.e2c6dc2b.js rename to 30.d830e073.js index a3cd79dd8..9c096e662 100644 --- a/29.e2c6dc2b.js +++ b/30.d830e073.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{178:function(n,i,o){"use strict";o.r(i);var r=o(55);for(var t in r)["default"].indexOf(t)<0&&function(n){o.d(i,n,(function(){return r[n]}))}(t)}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{179:function(n,i,o){"use strict";o.r(i);var r=o(55);for(var t in r)["default"].indexOf(t)<0&&function(n){o.d(i,n,(function(){return r[n]}))}(t)}}]); \ No newline at end of file diff --git a/30.f2ab2909.js b/31.3f82c6fa.js similarity index 80% rename from 30.f2ab2909.js rename to 31.3f82c6fa.js index 4d6424f88..e385b74d5 100644 --- a/30.f2ab2909.js +++ b/31.3f82c6fa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{116:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),l=a(109);t.default=function(){return o.a.createElement(l.a,{title:"Page Not Found"},o.a.createElement("main",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{117:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),l=a(110);t.default=function(){return o.a.createElement(l.a,{title:"Page Not Found"},o.a.createElement("main",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file diff --git a/36572f8b.0a7b4e6f.js b/36572f8b.42de73d0.js similarity index 96% rename from 36572f8b.0a7b4e6f.js rename to 36572f8b.42de73d0.js index 16f23640f..e9076ae2b 100644 --- a/36572f8b.0a7b4e6f.js +++ b/36572f8b.42de73d0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{75:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return u})),r.d(t,"default",(function(){return s}));var n=r(3),a=r(7),o=(r(0),r(98)),i={id:"web",title:"Web Interface"},c={unversionedId:"usage/web",id:"usage/web",isDocsHomePage:!1,title:"Web Interface",description:"Frigate comes bundled with a simple web ui that supports the following:",source:"@site/docs/usage/web.md",slug:"/usage/web",permalink:"/frigate/usage/web",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/web.md",version:"current",sidebar:"docs",previous:{title:"Integration with Home Assistant",permalink:"/frigate/usage/home-assistant"},next:{title:"HTTP API",permalink:"/frigate/usage/api"}},u=[],l={toc:u};function s(e){var t=e.components,r=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(n.a)({},l,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Frigate comes bundled with a simple web ui that supports the following:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Show cameras"),Object(o.b)("li",{parentName:"ul"},"Browse events"),Object(o.b)("li",{parentName:"ul"},"Mask helper")))}s.isMDXComponent=!0},98:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return m}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=a.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),p=s(r),f=n,m=p["".concat(i,".").concat(f)]||p[f]||b[f]||o;return r?a.a.createElement(m,c(c({ref:t},l),{},{components:r})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=a.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),p=s(r),f=n,m=p["".concat(i,".").concat(f)]||p[f]||b[f]||o;return r?a.a.createElement(m,c(c({ref:t},l),{},{components:r})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l Add-on Store > Repositories"),Object(i.b)("li",{parentName:"ol"},"Add ",Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/blakeblackshear/frigate-hass-addons"}),"https://github.com/blakeblackshear/frigate-hass-addons")),Object(i.b)("li",{parentName:"ol"},"Setup your network configuration in the ",Object(i.b)("inlineCode",{parentName:"li"},"Configuration")," tab if deisred"),Object(i.b)("li",{parentName:"ol"},"Create the file ",Object(i.b)("inlineCode",{parentName:"li"},"frigate.yml")," in your ",Object(i.b)("inlineCode",{parentName:"li"},"config")," directory with your detailed Frigate conifguration"),Object(i.b)("li",{parentName:"ol"},"Start the addon container"),Object(i.b)("li",{parentName:"ol"},'If you are using hardware acceleration for ffmpeg, you will need to disable "Protection mode"')),Object(i.b)("h2",{id:"docker"},"Docker"),Object(i.b)("p",null,"Make sure you choose the right image for your architecture:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Arch"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Image Name"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"amd64"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-amd64")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"amd64nvidia"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-amd64nvidia")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"armv7"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-armv7")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"aarch64"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-aarch64")))),Object(i.b)("p",null,"It is recommended to run with docker-compose:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"version: '3.9'\nservices:\n frigate:\n container_name: frigate\n privileged: true # this may not be necessary for all setups\n restart: unless-stopped\n image: blakeblackshear/frigate:\n devices:\n - /dev/bus/usb:/dev/bus/usb\n - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware\n volumes:\n - /etc/localtime:/etc/localtime:ro\n - :/config/config.yml:ro\n - :/media/frigate\n - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear\n target: /tmp/cache\n tmpfs:\n size: 1000000000\n ports:\n - '5000:5000'\n - '1935:1935' # RTMP feeds\n environment:\n FRIGATE_RTSP_PASSWORD: 'password'\n")),Object(i.b)("p",null,"If you can't use docker compose, you can run the container with something similar to this:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"docker run -d \\\n --name frigate \\\n --restart=unless-stopped \\\n --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \\\n --device /dev/bus/usb:/dev/bus/usb \\\n --device /dev/dri/renderD128 \\\n -v :/media/frigate \\\n -v :/config/config.yml:ro \\\n -v /etc/localtime:/etc/localtime:ro \\\n -e FRIGATE_RTSP_PASSWORD='password' \\\n -p 5000:5000 \\\n -p 1935:1935 \\\n blakeblackshear/frigate:\n")),Object(i.b)("h3",{id:"calculating-shm-size"},"Calculating shm-size"),Object(i.b)("p",null,'The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.'),Object(i.b)("p",null,"You can calculate the necessary shm-size for each camera with the following formula:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{}),"(width * height * 1.5 * 7 + 270480)/1048576 = \n")),Object(i.b)("p",null,"The shm size cannot be set per container for HomeAssistant Addons. You must set ",Object(i.b)("inlineCode",{parentName:"p"},"default-shm-size")," in ",Object(i.b)("inlineCode",{parentName:"p"},"/etc/docker/daemon.json")," to increase the default shm size. This will increase the shm size for all of your docker containers. This may or may not cause issues with your setup. ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file"}),"https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file")),Object(i.b)("h2",{id:"kubernetes"},"Kubernetes"),Object(i.b)("p",null,"Use the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/blakeshome-charts/tree/master/charts/frigate"}),"helm chart"),"."),Object(i.b)("h2",{id:"virtualization"},"Virtualization"),Object(i.b)("p",null,"For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices."),Object(i.b)("h3",{id:"proxmox"},"Proxmox"),Object(i.b)("p",null,"Some people have had success running Frigate in LXC directly with the following config:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{}),"arch: amd64\ncores: 2\nfeatures: nesting=1\nhostname: FrigateLXC\nmemory: 4096\nnet0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth\nostype: debian\nrootfs: local-lvm:vm-115-disk-0,size=12G\nswap: 512\nlxc.cgroup.devices.allow: c 189:385 rwm\nlxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file\nlxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file\nlxc.apparmor.profile: unconfined\nlxc.cgroup.devices.allow: a\nlxc.cap.drop:\n")),Object(i.b)("h3",{id:"esx"},"ESX"),Object(i.b)("p",null,"For details on running Frigate under ESX, see details ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate/issues/305"}),"here"),"."))}b.isMDXComponent=!0},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return m}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=r.a.createContext({}),b=function(e){var t=r.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=b(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=b(a),p=n,m=d["".concat(o,".").concat(p)]||d[p]||u[p]||i;return a?r.a.createElement(m,c(c({ref:t},s),{},{components:a})):r.a.createElement(m,c({ref:t},s))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,o[1]=c;for(var s=2;s Add-on Store > Repositories"),Object(i.b)("li",{parentName:"ol"},"Add ",Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/blakeblackshear/frigate-hass-addons"}),"https://github.com/blakeblackshear/frigate-hass-addons")),Object(i.b)("li",{parentName:"ol"},"Setup your network configuration in the ",Object(i.b)("inlineCode",{parentName:"li"},"Configuration")," tab if deisred"),Object(i.b)("li",{parentName:"ol"},"Create the file ",Object(i.b)("inlineCode",{parentName:"li"},"frigate.yml")," in your ",Object(i.b)("inlineCode",{parentName:"li"},"config")," directory with your detailed Frigate conifguration"),Object(i.b)("li",{parentName:"ol"},"Start the addon container"),Object(i.b)("li",{parentName:"ol"},'If you are using hardware acceleration for ffmpeg, you will need to disable "Protection mode"')),Object(i.b)("h2",{id:"docker"},"Docker"),Object(i.b)("p",null,"Make sure you choose the right image for your architecture:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Arch"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Image Name"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"amd64"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-amd64")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"amd64nvidia"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-amd64nvidia")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"armv7"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-armv7")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"aarch64"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"blakeblackshear/frigate:stable-aarch64")))),Object(i.b)("p",null,"It is recommended to run with docker-compose:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"version: '3.9'\nservices:\n frigate:\n container_name: frigate\n privileged: true # this may not be necessary for all setups\n restart: unless-stopped\n image: blakeblackshear/frigate:\n devices:\n - /dev/bus/usb:/dev/bus/usb\n - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware\n volumes:\n - /etc/localtime:/etc/localtime:ro\n - :/config/config.yml:ro\n - :/media/frigate\n - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear\n target: /tmp/cache\n tmpfs:\n size: 1000000000\n ports:\n - '5000:5000'\n - '1935:1935' # RTMP feeds\n environment:\n FRIGATE_RTSP_PASSWORD: 'password'\n")),Object(i.b)("p",null,"If you can't use docker compose, you can run the container with something similar to this:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),"docker run -d \\\n --name frigate \\\n --restart=unless-stopped \\\n --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \\\n --device /dev/bus/usb:/dev/bus/usb \\\n --device /dev/dri/renderD128 \\\n -v :/media/frigate \\\n -v :/config/config.yml:ro \\\n -v /etc/localtime:/etc/localtime:ro \\\n -e FRIGATE_RTSP_PASSWORD='password' \\\n -p 5000:5000 \\\n -p 1935:1935 \\\n blakeblackshear/frigate:\n")),Object(i.b)("h3",{id:"calculating-shm-size"},"Calculating shm-size"),Object(i.b)("p",null,'The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.'),Object(i.b)("p",null,"You can calculate the necessary shm-size for each camera with the following formula:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{}),"(width * height * 1.5 * 7 + 270480)/1048576 = \n")),Object(i.b)("p",null,"The shm size cannot be set per container for HomeAssistant Addons. You must set ",Object(i.b)("inlineCode",{parentName:"p"},"default-shm-size")," in ",Object(i.b)("inlineCode",{parentName:"p"},"/etc/docker/daemon.json")," to increase the default shm size. This will increase the shm size for all of your docker containers. This may or may not cause issues with your setup. ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file"}),"https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file")),Object(i.b)("h2",{id:"kubernetes"},"Kubernetes"),Object(i.b)("p",null,"Use the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/blakeshome-charts/tree/master/charts/frigate"}),"helm chart"),"."),Object(i.b)("h2",{id:"virtualization"},"Virtualization"),Object(i.b)("p",null,"For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices."),Object(i.b)("h3",{id:"proxmox"},"Proxmox"),Object(i.b)("p",null,"Some people have had success running Frigate in LXC directly with the following config:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{}),"arch: amd64\ncores: 2\nfeatures: nesting=1\nhostname: FrigateLXC\nmemory: 4096\nnet0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth\nostype: debian\nrootfs: local-lvm:vm-115-disk-0,size=12G\nswap: 512\nlxc.cgroup.devices.allow: c 189:385 rwm\nlxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file\nlxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file\nlxc.apparmor.profile: unconfined\nlxc.cgroup.devices.allow: a\nlxc.cap.drop:\n")),Object(i.b)("h3",{id:"esx"},"ESX"),Object(i.b)("p",null,"For details on running Frigate under ESX, see details ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate/issues/305"}),"here"),"."))}b.isMDXComponent=!0},99:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return m}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=r.a.createContext({}),b=function(e){var t=r.a.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=b(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=b(a),p=n,m=d["".concat(o,".").concat(p)]||d[p]||u[p]||i;return a?r.a.createElement(m,c(c({ref:t},s),{},{components:a})):r.a.createElement(m,c({ref:t},s))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,o[1]=c;for(var s=2;s-.jpg"),"."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"# Optional: Configuration for the jpg snapshots written to the clips directory for each event\nsnapshots:\n # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: False\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: False\n # Optional: crop the snapshot (default: shown below)\n crop: False\n # Optional: height to resize the snapshot to (default: original size)\n height: 175\n # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n")),Object(i.b)("h2",{id:"247-recordings"},"24/7 Recordings"),Object(i.b)("p",null,"24/7 recordings can be enabled and are stored at ",Object(i.b)("inlineCode",{parentName:"p"},"/media/frigate/recordings"),". The folder structure for the recordings is ",Object(i.b)("inlineCode",{parentName:"p"},"YYYY-MM/DD/HH//MM.SS.mp4"),". These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config."),Object(i.b)("div",{className:"admonition admonition-caution alert alert--warning"},Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"}),Object(i.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})))),"caution")),Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"Previous versions of frigate included ",Object(i.b)("inlineCode",{parentName:"p"},"-vsync drop")," in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set."))),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"# Optional: 24/7 recording configuration\nrecord:\n # Optional: Enable recording (default: global setting)\n enabled: False\n # Optional: Number of days to retain (default: global setting)\n retain_days: 30\n")),Object(i.b)("h2",{id:"rtmp-streams"},"RTMP streams"),Object(i.b)("p",null,"Frigate can re-stream your video feed as a RTMP feed for other applications such as HomeAssistant to utilize it at ",Object(i.b)("inlineCode",{parentName:"p"},"rtmp:///live/"),". Port 1935 must be open. This allows you to use a video feed for detection in frigate and HomeAssistant live view at the same time without having to make two separate connections to the camera. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate."),Object(i.b)("p",null,"Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization."),Object(i.b)("h2",{id:"full-example"},"Full example"),Object(i.b)("p",null,"The following is a full example of all of the options together for a camera configuration"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"cameras:\n # Required: name of the camera\n back:\n # Required: ffmpeg settings for the camera\n ffmpeg:\n # Required: A list of input streams for the camera. See documentation for more information.\n inputs:\n # Required: the path to the stream\n # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n # Required: list of roles for this stream. valid values are: detect,record,clips,rtmp\n # NOTICE: In addition to assigning the record, clips, and rtmp roles,\n # they must also be enabled in the camera config.\n roles:\n - detect\n - rtmp\n # Optional: stream specific global args (default: inherit)\n global_args:\n # Optional: stream specific hwaccel args (default: inherit)\n hwaccel_args:\n # Optional: stream specific input args (default: inherit)\n input_args:\n # Optional: camera specific global args (default: inherit)\n global_args:\n # Optional: camera specific hwaccel args (default: inherit)\n hwaccel_args:\n # Optional: camera specific input args (default: inherit)\n input_args:\n # Optional: camera specific output args (default: inherit)\n output_args:\n\n # Required: width of the frame for the input with the detect role\n width: 1280\n # Required: height of the frame for the input with the detect role\n height: 720\n # Optional: desired fps for your camera for the input with the detect role\n # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.\n # Frigate will attempt to autodetect if not specified.\n fps: 5\n\n # Optional: camera level motion config\n motion:\n # Optional: motion mask\n # NOTE: see docs for more detailed info on creating masks\n mask: 0,900,1080,900,1080,1920,0,1920\n\n # Optional: timeout for highest scoring image before allowing it\n # to be replaced by a newer image. (default: shown below)\n best_image_timeout: 60\n\n # Optional: zones for this camera\n zones:\n # Required: name of the zone\n # NOTE: This must be different than any camera names, but can match with another zone on another\n # camera.\n front_steps:\n # Required: List of x,y coordinates to define the polygon of the zone.\n # NOTE: Coordinates can be generated at https://www.image-map.net/\n coordinates: 545,1077,747,939,788,805\n # Optional: Zone level object filters.\n # NOTE: The global and camera filters are applied upstream.\n filters:\n person:\n min_area: 5000\n max_area: 100000\n threshold: 0.7\n\n # Optional: Camera level detect settings\n detect:\n # Optional: enables detection for the camera (default: True)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: True\n # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)\n max_disappeared: 25\n\n # Optional: save clips configuration\n clips:\n # Required: enables clips for the camera (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: Number of seconds before the event to include in the clips (default: shown below)\n pre_capture: 5\n # Optional: Number of seconds after the event to include in the clips (default: shown below)\n post_capture: 5\n # Optional: Objects to save clips for. (default: all tracked objects)\n objects:\n - person\n # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n\n # Optional: 24/7 recording configuration\n record:\n # Optional: Enable recording (default: global setting)\n enabled: False\n # Optional: Number of days to retain (default: global setting)\n retain_days: 30\n\n # Optional: RTMP re-stream configuration\n rtmp:\n # Required: Enable the live stream (default: True)\n enabled: True\n\n # Optional: Configuration for the jpg snapshots written to the clips directory for each event\n snapshots:\n # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: False\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: False\n # Optional: crop the snapshot (default: shown below)\n crop: False\n # Optional: height to resize the snapshot to (default: original size)\n height: 175\n # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n\n # Optional: Configuration for the jpg snapshots published via MQTT\n mqtt:\n # Optional: Enable publishing snapshot via mqtt for camera (default: shown below)\n # NOTE: Only applies to publishing image data to MQTT via 'frigate///snapshot'.\n # All other messages will still be published.\n enabled: True\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: True\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: True\n # Optional: crop the snapshot (default: shown below)\n crop: True\n # Optional: height to resize the snapshot to (default: shown below)\n height: 270\n # Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n\n # Optional: Camera level object filters config.\n objects:\n track:\n - person\n - car\n # Optional: mask to prevent all object types from being detected in certain areas (default: no mask)\n # Checks based on the bottom center of the bounding box of the object.\n # NOTE: This mask is COMBINED with the object type specific mask below\n mask: 0,0,1000,0,1000,200,0,200\n filters:\n person:\n min_area: 5000\n max_area: 100000\n min_score: 0.5\n threshold: 0.7\n # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)\n # Checks based on the bottom center of the bounding box of the object\n mask: 0,0,1000,0,1000,200,0,200\n")),Object(i.b)("h2",{id:"camera-specific-configuration"},"Camera specific configuration"),Object(i.b)("h3",{id:"mjpeg-cameras"},"MJPEG Cameras"),Object(i.b)("p",null,"The input and output parameters need to be adjusted for MJPEG cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"})," input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -r\n - '3' # <---- adjust depending on your desired frame rate from the mjpeg image\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("p",null,"Note that mjpeg cameras require encoding the video into h264 for clips, recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"})," output_args:\n record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an\n clips: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an\n rtmp: -c:v libx264 -an -f flv\n")),Object(i.b)("h3",{id:"rtmp-cameras"},"RTMP Cameras"),Object(i.b)("p",null,"The input parameters need to be adjusted for RTMP cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("h3",{id:"reolink-410520-possibly-others"},"Reolink 410/520 (possibly others)"),Object(i.b)("p",null,"Several users have reported success with the rtmp video from Reolink cameras."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -rw_timeout\n - '5000000'\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("h3",{id:"blue-iris-rtsp-cameras"},"Blue Iris RTSP Cameras"),Object(i.b)("p",null,"You will need to remove ",Object(i.b)("inlineCode",{parentName:"p"},"nobuffer")," flag for Blue Iris RTSP cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -rtsp_transport\n - tcp\n - -stimeout\n - '5000000'\n - -use_wallclock_as_timestamps\n - '1'\n")))}d.isMDXComponent=!0},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return u}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=o.a.createContext({}),d=function(e){var t=o.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=d(e.components);return o.a.createElement(c.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=d(n),m=a,u=p["".concat(r,".").concat(m)]||p[m]||b[m]||i;return n?o.a.createElement(u,s(s({ref:t},c),{},{components:n})):o.a.createElement(u,s({ref:t},c))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,r[1]=s;for(var c=2;c-.jpg"),"."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"# Optional: Configuration for the jpg snapshots written to the clips directory for each event\nsnapshots:\n # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: False\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: False\n # Optional: crop the snapshot (default: shown below)\n crop: False\n # Optional: height to resize the snapshot to (default: original size)\n height: 175\n # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n")),Object(i.b)("h2",{id:"247-recordings"},"24/7 Recordings"),Object(i.b)("p",null,"24/7 recordings can be enabled and are stored at ",Object(i.b)("inlineCode",{parentName:"p"},"/media/frigate/recordings"),". The folder structure for the recordings is ",Object(i.b)("inlineCode",{parentName:"p"},"YYYY-MM/DD/HH//MM.SS.mp4"),". These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config."),Object(i.b)("div",{className:"admonition admonition-caution alert alert--warning"},Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"}),Object(i.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})))),"caution")),Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"Previous versions of frigate included ",Object(i.b)("inlineCode",{parentName:"p"},"-vsync drop")," in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set."))),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"# Optional: 24/7 recording configuration\nrecord:\n # Optional: Enable recording (default: global setting)\n enabled: False\n # Optional: Number of days to retain (default: global setting)\n retain_days: 30\n")),Object(i.b)("h2",{id:"rtmp-streams"},"RTMP streams"),Object(i.b)("p",null,"Frigate can re-stream your video feed as a RTMP feed for other applications such as HomeAssistant to utilize it at ",Object(i.b)("inlineCode",{parentName:"p"},"rtmp:///live/"),". Port 1935 must be open. This allows you to use a video feed for detection in frigate and HomeAssistant live view at the same time without having to make two separate connections to the camera. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate."),Object(i.b)("p",null,"Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization."),Object(i.b)("h2",{id:"full-example"},"Full example"),Object(i.b)("p",null,"The following is a full example of all of the options together for a camera configuration"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"cameras:\n # Required: name of the camera\n back:\n # Required: ffmpeg settings for the camera\n ffmpeg:\n # Required: A list of input streams for the camera. See documentation for more information.\n inputs:\n # Required: the path to the stream\n # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n # Required: list of roles for this stream. valid values are: detect,record,clips,rtmp\n # NOTICE: In addition to assigning the record, clips, and rtmp roles,\n # they must also be enabled in the camera config.\n roles:\n - detect\n - rtmp\n # Optional: stream specific global args (default: inherit)\n global_args:\n # Optional: stream specific hwaccel args (default: inherit)\n hwaccel_args:\n # Optional: stream specific input args (default: inherit)\n input_args:\n # Optional: camera specific global args (default: inherit)\n global_args:\n # Optional: camera specific hwaccel args (default: inherit)\n hwaccel_args:\n # Optional: camera specific input args (default: inherit)\n input_args:\n # Optional: camera specific output args (default: inherit)\n output_args:\n\n # Required: width of the frame for the input with the detect role\n width: 1280\n # Required: height of the frame for the input with the detect role\n height: 720\n # Optional: desired fps for your camera for the input with the detect role\n # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.\n # Frigate will attempt to autodetect if not specified.\n fps: 5\n\n # Optional: camera level motion config\n motion:\n # Optional: motion mask\n # NOTE: see docs for more detailed info on creating masks\n mask: 0,900,1080,900,1080,1920,0,1920\n\n # Optional: timeout for highest scoring image before allowing it\n # to be replaced by a newer image. (default: shown below)\n best_image_timeout: 60\n\n # Optional: zones for this camera\n zones:\n # Required: name of the zone\n # NOTE: This must be different than any camera names, but can match with another zone on another\n # camera.\n front_steps:\n # Required: List of x,y coordinates to define the polygon of the zone.\n # NOTE: Coordinates can be generated at https://www.image-map.net/\n coordinates: 545,1077,747,939,788,805\n # Optional: Zone level object filters.\n # NOTE: The global and camera filters are applied upstream.\n filters:\n person:\n min_area: 5000\n max_area: 100000\n threshold: 0.7\n\n # Optional: Camera level detect settings\n detect:\n # Optional: enables detection for the camera (default: True)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: True\n # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)\n max_disappeared: 25\n\n # Optional: save clips configuration\n clips:\n # Required: enables clips for the camera (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: Number of seconds before the event to include in the clips (default: shown below)\n pre_capture: 5\n # Optional: Number of seconds after the event to include in the clips (default: shown below)\n post_capture: 5\n # Optional: Objects to save clips for. (default: all tracked objects)\n objects:\n - person\n # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n\n # Optional: 24/7 recording configuration\n record:\n # Optional: Enable recording (default: global setting)\n enabled: False\n # Optional: Number of days to retain (default: global setting)\n retain_days: 30\n\n # Optional: RTMP re-stream configuration\n rtmp:\n # Required: Enable the live stream (default: True)\n enabled: True\n\n # Optional: Configuration for the jpg snapshots written to the clips directory for each event\n snapshots:\n # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: False\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: False\n # Optional: crop the snapshot (default: shown below)\n crop: False\n # Optional: height to resize the snapshot to (default: original size)\n height: 175\n # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n\n # Optional: Configuration for the jpg snapshots published via MQTT\n mqtt:\n # Optional: Enable publishing snapshot via mqtt for camera (default: shown below)\n # NOTE: Only applies to publishing image data to MQTT via 'frigate///snapshot'.\n # All other messages will still be published.\n enabled: True\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: True\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: True\n # Optional: crop the snapshot (default: shown below)\n crop: True\n # Optional: height to resize the snapshot to (default: shown below)\n height: 270\n # Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)\n required_zones: []\n\n # Optional: Camera level object filters config.\n objects:\n track:\n - person\n - car\n # Optional: mask to prevent all object types from being detected in certain areas (default: no mask)\n # Checks based on the bottom center of the bounding box of the object.\n # NOTE: This mask is COMBINED with the object type specific mask below\n mask: 0,0,1000,0,1000,200,0,200\n filters:\n person:\n min_area: 5000\n max_area: 100000\n min_score: 0.5\n threshold: 0.7\n # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)\n # Checks based on the bottom center of the bounding box of the object\n mask: 0,0,1000,0,1000,200,0,200\n")),Object(i.b)("h2",{id:"camera-specific-configuration"},"Camera specific configuration"),Object(i.b)("h3",{id:"mjpeg-cameras"},"MJPEG Cameras"),Object(i.b)("p",null,"The input and output parameters need to be adjusted for MJPEG cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"})," input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -r\n - '3' # <---- adjust depending on your desired frame rate from the mjpeg image\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("p",null,"Note that mjpeg cameras require encoding the video into h264 for clips, recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"})," output_args:\n record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an\n clips: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an\n rtmp: -c:v libx264 -an -f flv\n")),Object(i.b)("h3",{id:"rtmp-cameras"},"RTMP Cameras"),Object(i.b)("p",null,"The input parameters need to be adjusted for RTMP cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("h3",{id:"reolink-410520-possibly-others"},"Reolink 410/520 (possibly others)"),Object(i.b)("p",null,"Several users have reported success with the rtmp video from Reolink cameras."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -rw_timeout\n - '5000000'\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("h3",{id:"blue-iris-rtsp-cameras"},"Blue Iris RTSP Cameras"),Object(i.b)("p",null,"You will need to remove ",Object(i.b)("inlineCode",{parentName:"p"},"nobuffer")," flag for Blue Iris RTSP cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -rtsp_transport\n - tcp\n - -stimeout\n - '5000000'\n - -use_wallclock_as_timestamps\n - '1'\n")))}d.isMDXComponent=!0},99:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return u}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=o.a.createContext({}),d=function(e){var t=o.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=d(e.components);return o.a.createElement(c.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=d(n),m=a,u=p["".concat(r,".").concat(m)]||p[m]||b[m]||i;return n?o.a.createElement(u,s(s({ref:t},c),{},{components:n})):o.a.createElement(u,s({ref:t},c))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,r[1]=s;for(var c=2;c Page Not Found | Frigate - - - - - - - + + + + + + +

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - - - - - - + + + + + + + \ No newline at end of file diff --git a/4d54d076.96df23c3.js b/4d54d076.bd641069.js similarity index 98% rename from 4d54d076.96df23c3.js rename to 4d54d076.bd641069.js index 8e8787c58..4d022a0e3 100644 --- a/4d54d076.96df23c3.js +++ b/4d54d076.bd641069.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{78:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"toc",(function(){return l})),n.d(t,"default",(function(){return b}));var a=n(3),r=n(7),i=(n(0),n(98)),o={id:"contributing",title:"Contributing"},c={unversionedId:"contributing",id:"contributing",isDocsHomePage:!1,title:"Contributing",description:"Getting the source",source:"@site/docs/contributing.md",slug:"/contributing",permalink:"/frigate/contributing",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/contributing.md",version:"current",sidebar:"docs",previous:{title:"MQTT",permalink:"/frigate/usage/mqtt"}},l=[{value:"Getting the source",id:"getting-the-source",children:[{value:"Core, Web, Docker, and Documentation",id:"core-web-docker-and-documentation",children:[]},{value:"Frigate Home Assistant Addon",id:"frigate-home-assistant-addon",children:[]},{value:"Frigate Home Assistant Integration",id:"frigate-home-assistant-integration",children:[]}]},{value:"Core",id:"core",children:[{value:"Prerequisites",id:"prerequisites",children:[]}]},{value:"Web Interface",id:"web-interface",children:[{value:"Prerequisites",id:"prerequisites-1",children:[]},{value:"Making changes",id:"making-changes",children:[]}]},{value:"Documentation",id:"documentation",children:[{value:"Prerequisites",id:"prerequisites-2",children:[]},{value:"Making changes",id:"making-changes-1",children:[]}]}],s={toc:l};function b(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"getting-the-source"},"Getting the source"),Object(i.b)("h3",{id:"core-web-docker-and-documentation"},"Core, Web, Docker, and Documentation"),Object(i.b)("p",null,"This repository holds the main Frigate application and all of its dependencies."),Object(i.b)("p",null,"Fork ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate.git"}),"blakeblackshear/frigate")," to your own GitHub profile, then clone the forked repo to your local machine."),Object(i.b)("p",null,"From here, follow the guides for:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#core"}),"Core")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#web-interface"}),"Web Interface")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#documentation"}),"Documentation"))),Object(i.b)("h3",{id:"frigate-home-assistant-addon"},"Frigate Home Assistant Addon"),Object(i.b)("p",null,"This repository holds the Home Assistant Addon, for use with Home Assistant OS and compatible installations. It is the piece that allows you to run Frigate from your Home Assistant Supervisor tab."),Object(i.b)("p",null,"Fork ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate-hass-addons"}),"blakeblackshear/frigate-hass-addons")," to your own Github profile, then clone the forked repo to your local machine."),Object(i.b)("h3",{id:"frigate-home-assistant-integration"},"Frigate Home Assistant Integration"),Object(i.b)("p",null,"This repository holds the custom integration that allows your Home Assistant installation to automatically create entities for your Frigate instance, whether you run that with the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"#frigate-home-assistant-addon"}),"addon")," or in a separate Docker instance."),Object(i.b)("p",null,"Fork ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate-hass-integration"}),"blakeblackshear/frigate-hass-integration")," to your own GitHub profile, then clone the forked repo to your local machine."),Object(i.b)("h2",{id:"core"},"Core"),Object(i.b)("h3",{id:"prerequisites"},"Prerequisites"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#frigate-core-web-and-docs"}),"Frigate source code")),Object(i.b)("li",{parentName:"ul"},"GNU make"),Object(i.b)("li",{parentName:"ul"},"Docker")),Object(i.b)("h2",{id:"web-interface"},"Web Interface"),Object(i.b)("h3",{id:"prerequisites-1"},"Prerequisites"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#frigate-core-web-and-docs"}),"Frigate source code")),Object(i.b)("li",{parentName:"ul"},"All ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#core"}),"core")," prerequisites ",Object(i.b)("em",{parentName:"li"},"or")," another running Frigate instance locally available"),Object(i.b)("li",{parentName:"ul"},"Node.js 14")),Object(i.b)("h3",{id:"making-changes"},"Making changes"),Object(i.b)("h4",{id:"1-set-up-a-frigate-instance"},"1. Set up a Frigate instance"),Object(i.b)("p",null,"The Web UI requires an instance of Frigate to interact with for all of its data. You can either run an instance locally (recommended) or attach to a separate instance accessible on your network."),Object(i.b)("p",null,"To run the local instance, follow the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"#core"}),"core")," development instructions."),Object(i.b)("p",null,"If you won't be making any changes to the Frigate HTTP API, you can attach the web development server to any Frigate instance on your network. Skip this step and go to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"#3a-run-the-development-server-against-a-non-local-instance"}),"3a"),"."),Object(i.b)("h4",{id:"2-install-dependencies"},"2. Install dependencies"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"cd web && npm install\n")),Object(i.b)("h4",{id:"3-run-the-development-server"},"3. Run the development server"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"cd web && npm run start\n")),Object(i.b)("h4",{id:"3a-run-the-development-server-against-a-non-local-instance"},"3a. Run the development server against a non-local instance"),Object(i.b)("p",null,"To run the development server against a non-local instance, you will need to provide an environment variable, ",Object(i.b)("inlineCode",{parentName:"p"},"SNOWPACK_PUBLIC_API_HOST")," that tells the web application how to connect to the Frigate API:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"cd web && SNOWPACK_PUBLIC_API_HOST=http://:5000 npm run start\n")),Object(i.b)("h4",{id:"4-making-changes"},"4. Making changes"),Object(i.b)("p",null,"The Web UI is built using ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.snowpack.dev/"}),"Snowpack"),", ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://preactjs.com"}),"Preact"),", and ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://tailwindcss.com"}),"Tailwind CSS"),"."),Object(i.b)("p",null,"Light guidelines and advice:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Avoid adding more dependencies. The web UI intends to be lightweight and fast to load."),Object(i.b)("li",{parentName:"ul"},"Do not make large sweeping changes. ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/blakeblackshear/frigate/discussions/new"}),"Open a discussion on GitHub")," for any large or architectural ideas."),Object(i.b)("li",{parentName:"ul"},"Ensure ",Object(i.b)("inlineCode",{parentName:"li"},"lint")," passes. This command will ensure basic conformance to styles, applying as many automatic fixes as possible, including Prettier formatting.")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run lint\n")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Add to unit tests and ensure they pass. As much as possible, you should strive to ",Object(i.b)("em",{parentName:"li"},"increase")," test coverage whenever making changes. This will help ensure features do not accidentally become broken in the future.")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run test\n")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Test in different browsers. Firefox, Chrome, and Safari all have different quirks that make them unique targets to interact with.")),Object(i.b)("h2",{id:"documentation"},"Documentation"),Object(i.b)("h3",{id:"prerequisites-2"},"Prerequisites"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#frigate-core-web-and-docs"}),"Frigate source code")),Object(i.b)("li",{parentName:"ul"},"Node.js 14")),Object(i.b)("h3",{id:"making-changes-1"},"Making changes"),Object(i.b)("h4",{id:"1-installation"},"1. Installation"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run install\n")),Object(i.b)("h4",{id:"2-local-development"},"2. Local Development"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run start\n")),Object(i.b)("p",null,"This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server."),Object(i.b)("p",null,"The docs are built using ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://v2.docusaurus.io"}),"Docusaurus v2"),". Please refer to the Docusaurus docs for more information on how to modify Frigate's documentation."),Object(i.b)("h4",{id:"3-build-optional"},"3. Build (optional)"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run build\n")),Object(i.b)("p",null,"This command generates static content into the ",Object(i.b)("inlineCode",{parentName:"p"},"build")," directory and can be served using any static contents hosting service."))}b.isMDXComponent=!0},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),b=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=b(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=b(n),d=a,h=u["".concat(o,".").concat(d)]||u[d]||p[d]||i;return n?r.a.createElement(h,c(c({ref:t},s),{},{components:n})):r.a.createElement(h,c({ref:t},s))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var s=2;s:5000 npm run start\n")),Object(i.b)("h4",{id:"4-making-changes"},"4. Making changes"),Object(i.b)("p",null,"The Web UI is built using ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.snowpack.dev/"}),"Snowpack"),", ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://preactjs.com"}),"Preact"),", and ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://tailwindcss.com"}),"Tailwind CSS"),"."),Object(i.b)("p",null,"Light guidelines and advice:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Avoid adding more dependencies. The web UI intends to be lightweight and fast to load."),Object(i.b)("li",{parentName:"ul"},"Do not make large sweeping changes. ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/blakeblackshear/frigate/discussions/new"}),"Open a discussion on GitHub")," for any large or architectural ideas."),Object(i.b)("li",{parentName:"ul"},"Ensure ",Object(i.b)("inlineCode",{parentName:"li"},"lint")," passes. This command will ensure basic conformance to styles, applying as many automatic fixes as possible, including Prettier formatting.")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run lint\n")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Add to unit tests and ensure they pass. As much as possible, you should strive to ",Object(i.b)("em",{parentName:"li"},"increase")," test coverage whenever making changes. This will help ensure features do not accidentally become broken in the future.")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run test\n")),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Test in different browsers. Firefox, Chrome, and Safari all have different quirks that make them unique targets to interact with.")),Object(i.b)("h2",{id:"documentation"},"Documentation"),Object(i.b)("h3",{id:"prerequisites-2"},"Prerequisites"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"#frigate-core-web-and-docs"}),"Frigate source code")),Object(i.b)("li",{parentName:"ul"},"Node.js 14")),Object(i.b)("h3",{id:"making-changes-1"},"Making changes"),Object(i.b)("h4",{id:"1-installation"},"1. Installation"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run install\n")),Object(i.b)("h4",{id:"2-local-development"},"2. Local Development"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run start\n")),Object(i.b)("p",null,"This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server."),Object(i.b)("p",null,"The docs are built using ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://v2.docusaurus.io"}),"Docusaurus v2"),". Please refer to the Docusaurus docs for more information on how to modify Frigate's documentation."),Object(i.b)("h4",{id:"3-build-optional"},"3. Build (optional)"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-console"}),"npm run build\n")),Object(i.b)("p",null,"This command generates static content into the ",Object(i.b)("inlineCode",{parentName:"p"},"build")," directory and can be served using any static contents hosting service."))}b.isMDXComponent=!0},99:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),b=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=b(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=b(n),d=a,h=u["".concat(o,".").concat(d)]||u[d]||p[d]||i;return n?r.a.createElement(h,c(c({ref:t},s),{},{components:n})):r.a.createElement(h,c({ref:t},s))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var s=2;s=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),u=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},l=function(e){var n=u(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},f=i.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,c=e.originalType,o=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),l=u(t),f=r,m=l["".concat(o,".").concat(f)]||l[f]||s[f]||c;return t?i.a.createElement(m,a(a({ref:n},p),{},{components:t})):i.a.createElement(m,a({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var c=t.length,o=new Array(c);o[0]=f;var a={};for(var d in n)hasOwnProperty.call(n,d)&&(a[d]=n[d]);a.originalType=e,a.mdxType="string"==typeof e?e:r,o[1]=a;for(var p=2;p=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),u=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},l=function(e){var n=u(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},f=i.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,c=e.originalType,o=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),l=u(t),f=r,m=l["".concat(o,".").concat(f)]||l[f]||s[f]||c;return t?i.a.createElement(m,a(a({ref:n},p),{},{components:t})):i.a.createElement(m,a({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var c=t.length,o=new Array(c);o[0]=f;var a={};for(var d in n)hasOwnProperty.call(n,d)&&(a[d]=n[d]);a.originalType=e,a.mdxType="string"==typeof e?e:r,o[1]=a;for(var p=2;p/api/<camera_name>",id:"apicamera_name",children:[]},{value:"/api/<camera_name>/<object_name>/best.jpg[?h=300&crop=1]",id:"apicamera_nameobject_namebestjpgh300crop1",children:[]},{value:"/api/<camera_name>/latest.jpg[?h=300]",id:"apicamera_namelatestjpgh300",children:[]},{value:"/api/stats",id:"apistats",children:[]},{value:"/api/config",id:"apiconfig",children:[]},{value:"/api/version",id:"apiversion",children:[]},{value:"/api/events",id:"apievents",children:[]},{value:"/api/events/summary",id:"apieventssummary",children:[]},{value:"/api/events/<id>",id:"apieventsid",children:[]},{value:"/api/events/<id>/thumbnail.jpg",id:"apieventsidthumbnailjpg",children:[]},{value:"/api/events/<id>/snapshot.jpg",id:"apieventsidsnapshotjpg",children:[]},{value:"/clips/<camera>-<id>.mp4",id:"clipscamera-idmp4",children:[]},{value:"/clips/<camera>-<id>.jpg",id:"clipscamera-idjpg",children:[]}],p={toc:c};function o(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(b.b)("wrapper",Object(n.a)({},p,a,{components:t,mdxType:"MDXLayout"}),Object(b.b)("p",null,"A web server is available on port 5000 with the following endpoints."),Object(b.b)("h3",{id:"apicamera_name"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/")),Object(b.b)("p",null,"An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"fps")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Frame rate")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"You can access a higher resolution mjpeg stream by appending ",Object(b.b)("inlineCode",{parentName:"p"},"h=height-in-pixels")," to the endpoint. For example ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/api/back?h=1080"),". You can also increase the FPS by appending ",Object(b.b)("inlineCode",{parentName:"p"},"fps=frame-rate")," to the URL such as ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/api/back?fps=10")," or both with ",Object(b.b)("inlineCode",{parentName:"p"},"?fps=10&h=1000"),"."),Object(b.b)("h3",{id:"apicamera_nameobject_namebestjpgh300crop1"},Object(b.b)("inlineCode",{parentName:"h3"},"/api///best.jpg[?h=300&crop=1]")),Object(b.b)("p",null,"The best snapshot for any object type. It is a full resolution image by default."),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"crop=1"),": crops the image to the region of the detection rather than returning the entire image")),Object(b.b)("h3",{id:"apicamera_namelatestjpgh300"},Object(b.b)("inlineCode",{parentName:"h3"},"/api//latest.jpg[?h=300]")),Object(b.b)("p",null,"The most recent frame that frigate has finished processing. It is a full resolution image by default."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall")),Object(b.b)("h3",{id:"apistats"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/stats")),Object(b.b)("p",null,"Contains some granular debug info that can be used for sensors in HomeAssistant."),Object(b.b)("p",null,"Sample response:"),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n /* Per Camera Stats */\n "back": {\n /***************\n * Frames per second being consumed from your camera. If this is higher\n * than it is supposed to be, you should set -r FPS in your input_args.\n * camera_fps = process_fps + skipped_fps\n ***************/\n "camera_fps": 5.0,\n /***************\n * Number of times detection is run per second. This can be higher than\n * your camera FPS because frigate often looks at the same frame multiple times\n * or in multiple locations\n ***************/\n "detection_fps": 1.5,\n /***************\n * PID for the ffmpeg process that consumes this camera\n ***************/\n "capture_pid": 27,\n /***************\n * PID for the process that runs detection for this camera\n ***************/\n "pid": 34,\n /***************\n * Frames per second being processed by frigate.\n ***************/\n "process_fps": 5.1,\n /***************\n * Frames per second skip for processing by frigate.\n ***************/\n "skipped_fps": 0.0\n },\n /***************\n * Sum of detection_fps across all cameras and detectors.\n * This should be the sum of all detection_fps values from cameras.\n ***************/\n "detection_fps": 5.0,\n /* Detectors Stats */\n "detectors": {\n "coral": {\n /***************\n * Timestamp when object detection started. If this value stays non-zero and constant\n * for a long time, that means the detection process is stuck.\n ***************/\n "detection_start": 0.0,\n /***************\n * Time spent running object detection in milliseconds.\n ***************/\n "inference_speed": 10.48,\n /***************\n * PID for the shared process that runs object detection on the Coral.\n ***************/\n "pid": 25321\n }\n },\n "service": {\n /* Uptime in seconds */\n "uptime": 10,\n "version": "0.8.0-8883709",\n /* Storage data in MB for important locations */\n "storage": {\n "/media/frigate/clips": {\n "total": 1000,\n "used": 700,\n "free": 300,\n "mnt_type": "ext4",\n },\n "/media/frigate/recordings": {\n "total": 1000,\n "used": 700,\n "free": 300,\n "mnt_type": "ext4",\n },\n "/tmp/cache": {\n "total": 256,\n "used": 100,\n "free": 156,\n "mnt_type": "tmpfs",\n },\n "/dev/shm": {\n "total": 256,\n "used": 100,\n "free": 156,\n "mnt_type": "tmpfs",\n },\n }\n }\n}\n')),Object(b.b)("h3",{id:"apiconfig"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/config")),Object(b.b)("p",null,"A json representation of your configuration"),Object(b.b)("h3",{id:"apiversion"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/version")),Object(b.b)("p",null,"Version info"),Object(b.b)("h3",{id:"apievents"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events")),Object(b.b)("p",null,"Events from the database. Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"before")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"after")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"camera")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Camera name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"label")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Label name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zone")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Zone name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"limit")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Limit the number of events returned")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_snapshot")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have snapshots (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_clip")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have clips (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"include_thumbnails")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Include thumbnails in the response (0 or 1)")))),Object(b.b)("h3",{id:"apieventssummary"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/summary")),Object(b.b)("p",null,"Returns summary data for events in the database. Used by the HomeAssistant integration."),Object(b.b)("h3",{id:"apieventsid"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/")),Object(b.b)("p",null,"Returns data for a single event."),Object(b.b)("h3",{id:"apieventsidthumbnailjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//thumbnail.jpg")),Object(b.b)("p",null,"Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ",Object(b.b)("inlineCode",{parentName:"p"},"?format=android")," will convert the thumbnail to 2:1 aspect ratio."),Object(b.b)("h3",{id:"apieventsidsnapshotjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//snapshot.jpg")),Object(b.b)("p",null,"Returns the snapshot image for the event id. Works while the event is in progress and after completion."),Object(b.b)("p",null,"Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"crop")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Crop the snapshot to the (0 or 1)")))),Object(b.b)("h3",{id:"clipscamera-idmp4"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.mp4")),Object(b.b)("p",null,"Video clip for the given camera and event id."),Object(b.b)("h3",{id:"clipscamera-idjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.jpg")),Object(b.b)("p",null,"JPG snapshot for the given camera and event id."))}o.isMDXComponent=!0},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return j}));var n=a(0),r=a.n(n);function b(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),o=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=o(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=o(a),s=n,j=d["".concat(i,".").concat(s)]||d[s]||m[s]||b;return a?r.a.createElement(j,l(l({ref:t},p),{},{components:a})):r.a.createElement(j,l({ref:t},p))}));function j(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,i=new Array(b);i[0]=s;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p/api/<camera_name>",id:"apicamera_name",children:[]},{value:"/api/<camera_name>/<object_name>/best.jpg[?h=300&crop=1]",id:"apicamera_nameobject_namebestjpgh300crop1",children:[]},{value:"/api/<camera_name>/latest.jpg[?h=300]",id:"apicamera_namelatestjpgh300",children:[]},{value:"/api/stats",id:"apistats",children:[]},{value:"/api/config",id:"apiconfig",children:[]},{value:"/api/version",id:"apiversion",children:[]},{value:"/api/events",id:"apievents",children:[]},{value:"/api/events/summary",id:"apieventssummary",children:[]},{value:"/api/events/<id>",id:"apieventsid",children:[]},{value:"/api/events/<id>/thumbnail.jpg",id:"apieventsidthumbnailjpg",children:[]},{value:"/api/events/<id>/snapshot.jpg",id:"apieventsidsnapshotjpg",children:[]},{value:"/clips/<camera>-<id>.mp4",id:"clipscamera-idmp4",children:[]},{value:"/clips/<camera>-<id>.jpg",id:"clipscamera-idjpg",children:[]}],p={toc:c};function o(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(b.b)("wrapper",Object(n.a)({},p,a,{components:t,mdxType:"MDXLayout"}),Object(b.b)("p",null,"A web server is available on port 5000 with the following endpoints."),Object(b.b)("h3",{id:"apicamera_name"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/")),Object(b.b)("p",null,"An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"fps")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Frame rate")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"You can access a higher resolution mjpeg stream by appending ",Object(b.b)("inlineCode",{parentName:"p"},"h=height-in-pixels")," to the endpoint. For example ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/api/back?h=1080"),". You can also increase the FPS by appending ",Object(b.b)("inlineCode",{parentName:"p"},"fps=frame-rate")," to the URL such as ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/api/back?fps=10")," or both with ",Object(b.b)("inlineCode",{parentName:"p"},"?fps=10&h=1000"),"."),Object(b.b)("h3",{id:"apicamera_nameobject_namebestjpgh300crop1"},Object(b.b)("inlineCode",{parentName:"h3"},"/api///best.jpg[?h=300&crop=1]")),Object(b.b)("p",null,"The best snapshot for any object type. It is a full resolution image by default."),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"crop=1"),": crops the image to the region of the detection rather than returning the entire image")),Object(b.b)("h3",{id:"apicamera_namelatestjpgh300"},Object(b.b)("inlineCode",{parentName:"h3"},"/api//latest.jpg[?h=300]")),Object(b.b)("p",null,"The most recent frame that frigate has finished processing. It is a full resolution image by default."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall")),Object(b.b)("h3",{id:"apistats"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/stats")),Object(b.b)("p",null,"Contains some granular debug info that can be used for sensors in HomeAssistant."),Object(b.b)("p",null,"Sample response:"),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n /* Per Camera Stats */\n "back": {\n /***************\n * Frames per second being consumed from your camera. If this is higher\n * than it is supposed to be, you should set -r FPS in your input_args.\n * camera_fps = process_fps + skipped_fps\n ***************/\n "camera_fps": 5.0,\n /***************\n * Number of times detection is run per second. This can be higher than\n * your camera FPS because frigate often looks at the same frame multiple times\n * or in multiple locations\n ***************/\n "detection_fps": 1.5,\n /***************\n * PID for the ffmpeg process that consumes this camera\n ***************/\n "capture_pid": 27,\n /***************\n * PID for the process that runs detection for this camera\n ***************/\n "pid": 34,\n /***************\n * Frames per second being processed by frigate.\n ***************/\n "process_fps": 5.1,\n /***************\n * Frames per second skip for processing by frigate.\n ***************/\n "skipped_fps": 0.0\n },\n /***************\n * Sum of detection_fps across all cameras and detectors.\n * This should be the sum of all detection_fps values from cameras.\n ***************/\n "detection_fps": 5.0,\n /* Detectors Stats */\n "detectors": {\n "coral": {\n /***************\n * Timestamp when object detection started. If this value stays non-zero and constant\n * for a long time, that means the detection process is stuck.\n ***************/\n "detection_start": 0.0,\n /***************\n * Time spent running object detection in milliseconds.\n ***************/\n "inference_speed": 10.48,\n /***************\n * PID for the shared process that runs object detection on the Coral.\n ***************/\n "pid": 25321\n }\n },\n "service": {\n /* Uptime in seconds */\n "uptime": 10,\n "version": "0.8.0-8883709",\n /* Storage data in MB for important locations */\n "storage": {\n "/media/frigate/clips": {\n "total": 1000,\n "used": 700,\n "free": 300,\n "mnt_type": "ext4",\n },\n "/media/frigate/recordings": {\n "total": 1000,\n "used": 700,\n "free": 300,\n "mnt_type": "ext4",\n },\n "/tmp/cache": {\n "total": 256,\n "used": 100,\n "free": 156,\n "mnt_type": "tmpfs",\n },\n "/dev/shm": {\n "total": 256,\n "used": 100,\n "free": 156,\n "mnt_type": "tmpfs",\n },\n }\n }\n}\n')),Object(b.b)("h3",{id:"apiconfig"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/config")),Object(b.b)("p",null,"A json representation of your configuration"),Object(b.b)("h3",{id:"apiversion"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/version")),Object(b.b)("p",null,"Version info"),Object(b.b)("h3",{id:"apievents"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events")),Object(b.b)("p",null,"Events from the database. Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"before")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"after")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"camera")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Camera name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"label")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Label name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zone")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Zone name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"limit")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Limit the number of events returned")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_snapshot")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have snapshots (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_clip")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have clips (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"include_thumbnails")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Include thumbnails in the response (0 or 1)")))),Object(b.b)("h3",{id:"apieventssummary"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/summary")),Object(b.b)("p",null,"Returns summary data for events in the database. Used by the HomeAssistant integration."),Object(b.b)("h3",{id:"apieventsid"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/")),Object(b.b)("p",null,"Returns data for a single event."),Object(b.b)("h3",{id:"apieventsidthumbnailjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//thumbnail.jpg")),Object(b.b)("p",null,"Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ",Object(b.b)("inlineCode",{parentName:"p"},"?format=android")," will convert the thumbnail to 2:1 aspect ratio."),Object(b.b)("h3",{id:"apieventsidsnapshotjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//snapshot.jpg")),Object(b.b)("p",null,"Returns the snapshot image for the event id. Works while the event is in progress and after completion."),Object(b.b)("p",null,"Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"crop")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Crop the snapshot to the (0 or 1)")))),Object(b.b)("h3",{id:"clipscamera-idmp4"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.mp4")),Object(b.b)("p",null,"Video clip for the given camera and event id."),Object(b.b)("h3",{id:"clipscamera-idjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.jpg")),Object(b.b)("p",null,"JPG snapshot for the given camera and event id."))}o.isMDXComponent=!0},99:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return j}));var n=a(0),r=a.n(n);function b(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),o=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=o(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=o(a),s=n,j=d["".concat(i,".").concat(s)]||d[s]||m[s]||b;return a?r.a.createElement(j,l(l({ref:t},p),{},{components:a})):r.a.createElement(j,l({ref:t},p))}));function j(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,i=new Array(b);i[0]=s;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(r),b=n,m=p["".concat(i,".").concat(b)]||p[b]||f[b]||a;return r?o.a.createElement(m,c(c({ref:t},l),{},{components:r})):o.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=b;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(r),b=n,m=p["".concat(i,".").concat(b)]||p[b]||f[b]||a;return r?o.a.createElement(m,c(c({ref:t},l),{},{components:r})):o.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=b;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b=r.a.createContext({}),p=function(e){var t=r.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return r.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},O=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,c=e.originalType,i=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),s=p(n),O=a,j=s["".concat(i,".").concat(O)]||s[O]||u[O]||c;return n?r.a.createElement(j,l(l({ref:t},b),{},{components:n})):r.a.createElement(j,l({ref:t},b))}));function j(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=n.length,i=new Array(c);i[0]=O;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var b=2;b=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b=r.a.createContext({}),p=function(e){var t=r.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return r.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},O=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,c=e.originalType,i=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),s=p(n),O=a,j=s["".concat(i,".").concat(O)]||s[O]||u[O]||c;return n?r.a.createElement(j,l(l({ref:t},b),{},{components:n})):r.a.createElement(j,l({ref:t},b))}));function j(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=n.length,i=new Array(c);i[0]=O;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var b=2;b=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),u=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=u(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=u(n),m=o,b=d["".concat(i,".").concat(m)]||d[m]||p[m]||a;return n?r.a.createElement(b,c(c({ref:t},s),{},{components:n})):r.a.createElement(b,c({ref:t},s))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var s=2;s=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),u=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=u(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=u(n),m=o,b=d["".concat(i,".").concat(m)]||d[m]||p[m]||a;return n?r.a.createElement(b,c(c({ref:t},s),{},{components:n})):r.a.createElement(b,c({ref:t},s))}));function b(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var s=2;sfrigate/available",id:"frigateavailable",children:[]},{value:"frigate/<camera_name>/<object_name>",id:"frigatecamera_nameobject_name",children:[]},{value:"frigate/<zone_name>/<object_name>",id:"frigatezone_nameobject_name",children:[]},{value:"frigate/<camera_name>/<object_name>/snapshot",id:"frigatecamera_nameobject_namesnapshot",children:[]},{value:"frigate/events",id:"frigateevents",children:[]},{value:"frigate/stats",id:"frigatestats",children:[]},{value:"frigate/<camera_name>/detect/set",id:"frigatecamera_namedetectset",children:[]},{value:"frigate/<camera_name>/detect/state",id:"frigatecamera_namedetectstate",children:[]},{value:"frigate/<camera_name>/clips/set",id:"frigatecamera_nameclipsset",children:[]},{value:"frigate/<camera_name>/clips/state",id:"frigatecamera_nameclipsstate",children:[]},{value:"frigate/<camera_name>/snapshots/set",id:"frigatecamera_namesnapshotsset",children:[]},{value:"frigate/<camera_name>/snapshots/state",id:"frigatecamera_namesnapshotsstate",children:[]}],l={toc:s};function b(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},l,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"These are the MQTT messages generated by Frigate. The default topic_prefix is ",Object(i.b)("inlineCode",{parentName:"p"},"frigate"),", but can be changed in the config file."),Object(i.b)("h3",{id:"frigateavailable"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/available")),Object(i.b)("p",null,'Designed to be used as an availability topic with HomeAssistant. Possible message are:\n"online": published when frigate is running (on startup)\n"offline": published right before frigate stops'),Object(i.b)("h3",{id:"frigatecamera_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//")),Object(i.b)("p",null,"Publishes the count of objects for the camera for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatezone_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//")),Object(i.b)("p",null,"Publishes the count of objects for the zone for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatecamera_nameobject_namesnapshot"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate///snapshot")),Object(i.b)("p",null,"Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image\nis published again."),Object(i.b)("p",null,"The height and crop of snapshots can be configured in the config."),Object(i.b)("h3",{id:"frigateevents"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/events")),Object(i.b)("p",null,"Message published for each changed event. The first message is published when the tracked object is no longer marked as a false_positive. When frigate finds a better snapshot of the tracked object or when a zone change occurs, it will publish a message with the same id. When the event ends, a final message is published with ",Object(i.b)("inlineCode",{parentName:"p"},"end_time")," set."),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n "type": "update", // new, update, or end\n "before": {\n "id": "1607123955.475377-mxklsc",\n "camera": "front_door",\n "frame_time": 1607123961.837752,\n "label": "person",\n "top_score": 0.958984375,\n "false_positive": false,\n "start_time": 1607123955.475377,\n "end_time": null,\n "score": 0.7890625,\n "box": [424, 500, 536, 712],\n "area": 23744,\n "region": [264, 450, 667, 853],\n "current_zones": ["driveway"],\n "entered_zones": ["yard", "driveway"],\n "thumbnail": null\n },\n "after": {\n "id": "1607123955.475377-mxklsc",\n "camera": "front_door",\n "frame_time": 1607123962.082975,\n "label": "person",\n "top_score": 0.958984375,\n "false_positive": false,\n "start_time": 1607123955.475377,\n "end_time": null,\n "score": 0.87890625,\n "box": [432, 496, 544, 854],\n "area": 40096,\n "region": [218, 440, 693, 915],\n "current_zones": ["yard", "driveway"],\n "entered_zones": ["yard", "driveway"],\n "thumbnail": null\n }\n}\n')),Object(i.b)("h3",{id:"frigatestats"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/stats")),Object(i.b)("p",null,"Same data available at ",Object(i.b)("inlineCode",{parentName:"p"},"/api/stats")," published at a configurable interval."),Object(i.b)("h3",{id:"frigatecamera_namedetectset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//detect/set")),Object(i.b)("p",null,"Topic to turn detection for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namedetectstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//detect/state")),Object(i.b)("p",null,"Topic with current state of detection for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_nameclipsset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//clips/set")),Object(i.b)("p",null,"Topic to turn clips for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_nameclipsstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//clips/state")),Object(i.b)("p",null,"Topic with current state of clips for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namesnapshotsset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//snapshots/set")),Object(i.b)("p",null,"Topic to turn snapshots for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namesnapshotsstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//snapshots/state")),Object(i.b)("p",null,"Topic with current state of snapshots for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."))}b.isMDXComponent=!0},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return f}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),b=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=b(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=b(a),p=n,f=d["".concat(c,".").concat(p)]||d[p]||m[p]||i;return a?r.a.createElement(f,o(o({ref:t},l),{},{components:a})):r.a.createElement(f,o({ref:t},l))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,c=new Array(i);c[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:n,c[1]=o;for(var l=2;lfrigate/available",id:"frigateavailable",children:[]},{value:"frigate/<camera_name>/<object_name>",id:"frigatecamera_nameobject_name",children:[]},{value:"frigate/<zone_name>/<object_name>",id:"frigatezone_nameobject_name",children:[]},{value:"frigate/<camera_name>/<object_name>/snapshot",id:"frigatecamera_nameobject_namesnapshot",children:[]},{value:"frigate/events",id:"frigateevents",children:[]},{value:"frigate/stats",id:"frigatestats",children:[]},{value:"frigate/<camera_name>/detect/set",id:"frigatecamera_namedetectset",children:[]},{value:"frigate/<camera_name>/detect/state",id:"frigatecamera_namedetectstate",children:[]},{value:"frigate/<camera_name>/clips/set",id:"frigatecamera_nameclipsset",children:[]},{value:"frigate/<camera_name>/clips/state",id:"frigatecamera_nameclipsstate",children:[]},{value:"frigate/<camera_name>/snapshots/set",id:"frigatecamera_namesnapshotsset",children:[]},{value:"frigate/<camera_name>/snapshots/state",id:"frigatecamera_namesnapshotsstate",children:[]}],l={toc:s};function b(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},l,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"These are the MQTT messages generated by Frigate. The default topic_prefix is ",Object(i.b)("inlineCode",{parentName:"p"},"frigate"),", but can be changed in the config file."),Object(i.b)("h3",{id:"frigateavailable"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/available")),Object(i.b)("p",null,'Designed to be used as an availability topic with HomeAssistant. Possible message are:\n"online": published when frigate is running (on startup)\n"offline": published right before frigate stops'),Object(i.b)("h3",{id:"frigatecamera_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//")),Object(i.b)("p",null,"Publishes the count of objects for the camera for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatezone_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//")),Object(i.b)("p",null,"Publishes the count of objects for the zone for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatecamera_nameobject_namesnapshot"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate///snapshot")),Object(i.b)("p",null,"Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image\nis published again."),Object(i.b)("p",null,"The height and crop of snapshots can be configured in the config."),Object(i.b)("h3",{id:"frigateevents"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/events")),Object(i.b)("p",null,"Message published for each changed event. The first message is published when the tracked object is no longer marked as a false_positive. When frigate finds a better snapshot of the tracked object or when a zone change occurs, it will publish a message with the same id. When the event ends, a final message is published with ",Object(i.b)("inlineCode",{parentName:"p"},"end_time")," set."),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n "type": "update", // new, update, or end\n "before": {\n "id": "1607123955.475377-mxklsc",\n "camera": "front_door",\n "frame_time": 1607123961.837752,\n "label": "person",\n "top_score": 0.958984375,\n "false_positive": false,\n "start_time": 1607123955.475377,\n "end_time": null,\n "score": 0.7890625,\n "box": [424, 500, 536, 712],\n "area": 23744,\n "region": [264, 450, 667, 853],\n "current_zones": ["driveway"],\n "entered_zones": ["yard", "driveway"],\n "thumbnail": null\n },\n "after": {\n "id": "1607123955.475377-mxklsc",\n "camera": "front_door",\n "frame_time": 1607123962.082975,\n "label": "person",\n "top_score": 0.958984375,\n "false_positive": false,\n "start_time": 1607123955.475377,\n "end_time": null,\n "score": 0.87890625,\n "box": [432, 496, 544, 854],\n "area": 40096,\n "region": [218, 440, 693, 915],\n "current_zones": ["yard", "driveway"],\n "entered_zones": ["yard", "driveway"],\n "thumbnail": null\n }\n}\n')),Object(i.b)("h3",{id:"frigatestats"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/stats")),Object(i.b)("p",null,"Same data available at ",Object(i.b)("inlineCode",{parentName:"p"},"/api/stats")," published at a configurable interval."),Object(i.b)("h3",{id:"frigatecamera_namedetectset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//detect/set")),Object(i.b)("p",null,"Topic to turn detection for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namedetectstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//detect/state")),Object(i.b)("p",null,"Topic with current state of detection for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_nameclipsset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//clips/set")),Object(i.b)("p",null,"Topic to turn clips for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_nameclipsstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//clips/state")),Object(i.b)("p",null,"Topic with current state of clips for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namesnapshotsset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//snapshots/set")),Object(i.b)("p",null,"Topic to turn snapshots for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namesnapshotsstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//snapshots/state")),Object(i.b)("p",null,"Topic with current state of snapshots for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."))}b.isMDXComponent=!0},99:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return f}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),b=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},d=function(e){var t=b(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=b(a),p=n,f=d["".concat(c,".").concat(p)]||d[p]||m[p]||i;return a?r.a.createElement(f,o(o({ref:t},l),{},{components:a})):r.a.createElement(f,o({ref:t},l))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,c=new Array(i);c[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:n,c[1]=o;for(var l=2;l=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var b=n.a.createContext({}),p=function(e){var t=n.a.useContext(b),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},m=function(e){var t=p(e.components);return n.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=n.a.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),m=p(a),d=r,s=m["".concat(c,".").concat(d)]||m[d]||u[d]||l;return a?n.a.createElement(s,i(i({ref:t},b),{},{components:a})):n.a.createElement(s,i({ref:t},b))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var b=2;b=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var b=n.a.createContext({}),p=function(e){var t=n.a.useContext(b),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},m=function(e){var t=p(e.components);return n.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},d=n.a.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),m=p(a),d=r,s=m["".concat(c,".").concat(d)]||m[d]||u[d]||l;return a?n.a.createElement(s,i(i({ref:t},b),{},{components:a})):n.a.createElement(s,i({ref:t},b))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=d;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=o.a.createContext({}),p=function(e){var t=o.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=p(e.components);return o.a.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,c=e.originalType,a=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=p(n),b=r,f=s["".concat(a,".").concat(b)]||s[b]||d[b]||c;return n?o.a.createElement(f,i(i({ref:t},u),{},{components:n})):o.a.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=n.length,a=new Array(c);a[0]=b;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:r,a[1]=i;for(var u=2;u=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=o.a.createContext({}),p=function(e){var t=o.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=p(e.components);return o.a.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,c=e.originalType,a=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=p(n),b=r,f=s["".concat(a,".").concat(b)]||s[b]||d[b]||c;return n?o.a.createElement(f,i(i({ref:t},u),{},{components:n})):o.a.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var c=n.length,a=new Array(c);a[0]=b;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:r,a[1]=i;for(var u=2;umotion",id:"motion",children:[]},{value:"detect",id:"detect",children:[]},{value:"logger",id:"logger",children:[]},{value:"environment_vars",id:"environment_vars",children:[]},{value:"database",id:"database",children:[]},{value:"detectors",id:"detectors",children:[]},{value:"model",id:"model",children:[]}]}],d={toc:c};function s(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},d,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h2",{id:"advanced-configuration"},"Advanced configuration"),Object(r.b)("h3",{id:"motion"},Object(r.b)("inlineCode",{parentName:"h3"},"motion")),Object(r.b)("p",null,"Global motion detection config. These may also be defined at the camera level."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"motion:\n # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)\n # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.\n # The value should be between 1 and 255.\n threshold: 25\n # Optional: Minimum size in pixels in the resized motion image that counts as motion\n # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller\n # moving objects.\n contour_area: 100\n # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)\n # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.\n # Too low and a fast moving person wont be detected as motion.\n delta_alpha: 0.2\n # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)\n # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.\n # Low values will cause things like moving shadows to be detected as motion for longer.\n # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/\n frame_alpha: 0.2\n # Optional: Height of the resized motion frame (default: 1/6th of the original frame height)\n # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.\n # Lower values result in less CPU, but small changes may not register as motion.\n frame_height: 180\n")),Object(r.b)("h3",{id:"detect"},Object(r.b)("inlineCode",{parentName:"h3"},"detect")),Object(r.b)("p",null,"Global object detection settings. These may also be defined at the camera level."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"detect:\n # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)\n max_disappeared: 25\n")),Object(r.b)("h3",{id:"logger"},Object(r.b)("inlineCode",{parentName:"h3"},"logger")),Object(r.b)("p",null,"Change the default log level for troubleshooting purposes."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"logger:\n # Optional: default log level (default: shown below)\n default: info\n # Optional: module by module log level configuration\n logs:\n frigate.mqtt: error\n")),Object(r.b)("p",null,"Available log levels are: ",Object(r.b)("inlineCode",{parentName:"p"},"debug"),", ",Object(r.b)("inlineCode",{parentName:"p"},"info"),", ",Object(r.b)("inlineCode",{parentName:"p"},"warning"),", ",Object(r.b)("inlineCode",{parentName:"p"},"error"),", ",Object(r.b)("inlineCode",{parentName:"p"},"critical")),Object(r.b)("p",null,"Examples of available modules are:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.app")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.mqtt")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.edgetpu")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.zeroconf")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"detector.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"watchdog.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"ffmpeg..")," NOTE: All FFmpeg logs are sent as ",Object(r.b)("inlineCode",{parentName:"li"},"error")," level.")),Object(r.b)("h3",{id:"environment_vars"},Object(r.b)("inlineCode",{parentName:"h3"},"environment_vars")),Object(r.b)("p",null,"This section can be used to set environment variables for those unable to modify the environment of the container (ie. within Hass.io)"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"environment_vars:\n EXAMPLE_VAR: value\n")),Object(r.b)("h3",{id:"database"},Object(r.b)("inlineCode",{parentName:"h3"},"database")),Object(r.b)("p",null,"Event and clip information is managed in a sqlite database at ",Object(r.b)("inlineCode",{parentName:"p"},"/media/frigate/clips/frigate.db"),". If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant."),Object(r.b)("p",null,"If you are storing your clips on a network share (SMB, NFS, etc), you may get a ",Object(r.b)("inlineCode",{parentName:"p"},"database is locked")," error message on startup. You can customize the location of the database in the config if necessary."),Object(r.b)("p",null,"This may need to be in a custom location if network storage is used for clips."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"database:\n path: /media/frigate/clips/frigate.db\n")),Object(r.b)("h3",{id:"detectors"},Object(r.b)("inlineCode",{parentName:"h3"},"detectors")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"detectors:\n # Required: name of the detector\n coral:\n # Required: type of the detector\n # Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu\n # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api\n device: usb\n # Optional: num_threads value passed to the tflite.Interpreter (default: shown below)\n # This value is only used for CPU types\n num_threads: 3\n")),Object(r.b)("h3",{id:"model"},Object(r.b)("inlineCode",{parentName:"h3"},"model")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"model:\n # Required: height of the trained model\n height: 320\n # Required: width of the trained model\n width: 320\n")))}s.isMDXComponent=!0},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return p}));var a=n(0),o=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=o.a.createContext({}),s=function(e){var t=o.a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},b=function(e){var t=s(e.components);return o.a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),b=s(n),m=a,p=b["".concat(i,".").concat(m)]||b[m]||u[m]||r;return n?o.a.createElement(p,l(l({ref:t},d),{},{components:n})):o.a.createElement(p,l({ref:t},d))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var d=2;dmotion",id:"motion",children:[]},{value:"detect",id:"detect",children:[]},{value:"logger",id:"logger",children:[]},{value:"environment_vars",id:"environment_vars",children:[]},{value:"database",id:"database",children:[]},{value:"detectors",id:"detectors",children:[]},{value:"model",id:"model",children:[]}]}],d={toc:c};function s(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},d,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h2",{id:"advanced-configuration"},"Advanced configuration"),Object(r.b)("h3",{id:"motion"},Object(r.b)("inlineCode",{parentName:"h3"},"motion")),Object(r.b)("p",null,"Global motion detection config. These may also be defined at the camera level."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"motion:\n # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)\n # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.\n # The value should be between 1 and 255.\n threshold: 25\n # Optional: Minimum size in pixels in the resized motion image that counts as motion\n # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller\n # moving objects.\n contour_area: 100\n # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)\n # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.\n # Too low and a fast moving person wont be detected as motion.\n delta_alpha: 0.2\n # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)\n # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.\n # Low values will cause things like moving shadows to be detected as motion for longer.\n # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/\n frame_alpha: 0.2\n # Optional: Height of the resized motion frame (default: 1/6th of the original frame height)\n # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.\n # Lower values result in less CPU, but small changes may not register as motion.\n frame_height: 180\n")),Object(r.b)("h3",{id:"detect"},Object(r.b)("inlineCode",{parentName:"h3"},"detect")),Object(r.b)("p",null,"Global object detection settings. These may also be defined at the camera level."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"detect:\n # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)\n max_disappeared: 25\n")),Object(r.b)("h3",{id:"logger"},Object(r.b)("inlineCode",{parentName:"h3"},"logger")),Object(r.b)("p",null,"Change the default log level for troubleshooting purposes."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"logger:\n # Optional: default log level (default: shown below)\n default: info\n # Optional: module by module log level configuration\n logs:\n frigate.mqtt: error\n")),Object(r.b)("p",null,"Available log levels are: ",Object(r.b)("inlineCode",{parentName:"p"},"debug"),", ",Object(r.b)("inlineCode",{parentName:"p"},"info"),", ",Object(r.b)("inlineCode",{parentName:"p"},"warning"),", ",Object(r.b)("inlineCode",{parentName:"p"},"error"),", ",Object(r.b)("inlineCode",{parentName:"p"},"critical")),Object(r.b)("p",null,"Examples of available modules are:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.app")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.mqtt")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.edgetpu")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"frigate.zeroconf")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"detector.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"watchdog.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"ffmpeg..")," NOTE: All FFmpeg logs are sent as ",Object(r.b)("inlineCode",{parentName:"li"},"error")," level.")),Object(r.b)("h3",{id:"environment_vars"},Object(r.b)("inlineCode",{parentName:"h3"},"environment_vars")),Object(r.b)("p",null,"This section can be used to set environment variables for those unable to modify the environment of the container (ie. within Hass.io)"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"environment_vars:\n EXAMPLE_VAR: value\n")),Object(r.b)("h3",{id:"database"},Object(r.b)("inlineCode",{parentName:"h3"},"database")),Object(r.b)("p",null,"Event and clip information is managed in a sqlite database at ",Object(r.b)("inlineCode",{parentName:"p"},"/media/frigate/clips/frigate.db"),". If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant."),Object(r.b)("p",null,"If you are storing your clips on a network share (SMB, NFS, etc), you may get a ",Object(r.b)("inlineCode",{parentName:"p"},"database is locked")," error message on startup. You can customize the location of the database in the config if necessary."),Object(r.b)("p",null,"This may need to be in a custom location if network storage is used for clips."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"database:\n path: /media/frigate/clips/frigate.db\n")),Object(r.b)("h3",{id:"detectors"},Object(r.b)("inlineCode",{parentName:"h3"},"detectors")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"detectors:\n # Required: name of the detector\n coral:\n # Required: type of the detector\n # Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu\n # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api\n device: usb\n # Optional: num_threads value passed to the tflite.Interpreter (default: shown below)\n # This value is only used for CPU types\n num_threads: 3\n")),Object(r.b)("h3",{id:"model"},Object(r.b)("inlineCode",{parentName:"h3"},"model")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"model:\n # Required: height of the trained model\n height: 320\n # Required: width of the trained model\n width: 320\n")))}s.isMDXComponent=!0},99:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return p}));var a=n(0),o=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=o.a.createContext({}),s=function(e){var t=o.a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},b=function(e){var t=s(e.components);return o.a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),b=s(n),m=a,p=b["".concat(i,".").concat(m)]||b[m]||u[m]||r;return n?o.a.createElement(p,l(l({ref:t},d),{},{components:n})):o.a.createElement(p,l({ref:t},d))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var d=2;d=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},b=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),b=u(r),m=n,d=b["".concat(i,".").concat(m)]||b[m]||p[m]||a;return r?o.a.createElement(d,c(c({ref:t},l),{},{components:r})):o.a.createElement(d,c({ref:t},l))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},b=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),b=u(r),m=n,d=b["".concat(i,".").concat(m)]||b[m]||p[m]||a;return r?o.a.createElement(d,c(c({ref:t},l),{},{components:r})):o.a.createElement(d,c({ref:t},l))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=o.a.createContext({}),l=function(e){var t=o.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=l(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,c=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),d=l(r),f=n,b=d["".concat(c,".").concat(f)]||d[f]||s[f]||a;return r?o.a.createElement(b,i(i({ref:t},p),{},{components:r})):o.a.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var p=2;p=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=o.a.createContext({}),l=function(e){var t=o.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=l(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,c=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),d=l(r),f=n,b=d["".concat(c,".").concat(f)]||d[f]||s[f]||a;return r?o.a.createElement(b,i(i({ref:t},p),{},{components:r})):o.a.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),l=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=l(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),p=l(n),b=r,f=p["".concat(a,".").concat(b)]||p[b]||m[b]||i;return n?o.a.createElement(f,c(c({ref:t},s),{},{components:n})):o.a.createElement(f,c({ref:t},s))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=b;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var s=2;s Advanced | Frigate - - - - - - - + + + + + + + - - + +

Advanced

Advanced configuration#

motion#

Global motion detection config. These may also be defined at the camera level.

motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold: 25
# Optional: Minimum size in pixels in the resized motion image that counts as motion
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller
# moving objects.
contour_area: 100
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
# Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
# Too low and a fast moving person wont be detected as motion.
delta_alpha: 0.2
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
# Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
# Low values will cause things like moving shadows to be detected as motion for longer.
# https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
frame_alpha: 0.2
# Optional: Height of the resized motion frame (default: 1/6th of the original frame height)
# This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.
# Lower values result in less CPU, but small changes may not register as motion.
frame_height: 180

detect#

Global object detection settings. These may also be defined at the camera level.

detect:
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25

logger#

Change the default log level for troubleshooting purposes.

logger:
# Optional: default log level (default: shown below)
default: info
# Optional: module by module log level configuration
logs:
frigate.mqtt: error

Available log levels are: debug, info, warning, error, critical

Examples of available modules are:

  • frigate.app
  • frigate.mqtt
  • frigate.edgetpu
  • frigate.zeroconf
  • detector.<detector_name>
  • watchdog.<camera_name>
  • ffmpeg.<camera_name>.<sorted_roles> NOTE: All FFmpeg logs are sent as error level.

environment_vars#

This section can be used to set environment variables for those unable to modify the environment of the container (ie. within Hass.io)

environment_vars:
EXAMPLE_VAR: value

database#

Event and clip information is managed in a sqlite database at /media/frigate/clips/frigate.db. If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant.

If you are storing your clips on a network share (SMB, NFS, etc), you may get a database is locked error message on startup. You can customize the location of the database in the config if necessary.

This may need to be in a custom location if network storage is used for clips.

database:
path: /media/frigate/clips/frigate.db

detectors#

detectors:
# Required: name of the detector
coral:
# Required: type of the detector
# Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu
# Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
device: usb
# Optional: num_threads value passed to the tflite.Interpreter (default: shown below)
# This value is only used for CPU types
num_threads: 3

model#

model:
# Required: height of the trained model
height: 320
# Required: width of the trained model
width: 320
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/cameras/index.html b/configuration/cameras/index.html index 3e300927c..76484cdbc 100644 --- a/configuration/cameras/index.html +++ b/configuration/cameras/index.html @@ -7,16 +7,16 @@ Cameras | Frigate - - - - - - - + + + + + + + - - + +
@@ -32,15 +32,15 @@
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
# Optional: Configuration for the jpg snapshots published via MQTT
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: True
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: True
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: True
# Optional: crop the snapshot (default: shown below)
crop: True
# Optional: height to resize the snapshot to (default: shown below)
height: 270
# Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera level object filters config.
objects:
track:
- person
- car
# Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object.
# NOTE: This mask is COMBINED with the object type specific mask below
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
mask: 0,0,1000,0,1000,200,0,200

Camera specific configuration#

MJPEG Cameras#

The input and output parameters need to be adjusted for MJPEG cameras

input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -r
- '3' # <---- adjust depending on your desired frame rate from the mjpeg image
- -use_wallclock_as_timestamps
- '1'

Note that mjpeg cameras require encoding the video into h264 for clips, recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly.

output_args:
record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
clips: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
rtmp: -c:v libx264 -an -f flv

RTMP Cameras#

The input parameters need to be adjusted for RTMP cameras

ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -use_wallclock_as_timestamps
- '1'

Reolink 410/520 (possibly others)#

Several users have reported success with the rtmp video from Reolink cameras.

ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -rw_timeout
- '5000000'
- -use_wallclock_as_timestamps
- '1'

Blue Iris RTSP Cameras#

You will need to remove nobuffer flag for Blue Iris RTSP cameras

ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -rtsp_transport
- tcp
- -stimeout
- '5000000'
- -use_wallclock_as_timestamps
- '1'
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/detectors/index.html b/configuration/detectors/index.html index 358ff82e9..5c33dc0e5 100644 --- a/configuration/detectors/index.html +++ b/configuration/detectors/index.html @@ -7,29 +7,29 @@ Detectors | Frigate - - - - - - - + + + + + + + - - + +

Detectors

The default config will look for a USB Coral device. If you do not have a Coral, you will need to configure a CPU detector. If you have PCI or multiple Coral devices, you need to configure your detector devices in the config file. When using multiple detectors, they run in dedicated processes, but pull from a common queue of requested detections across all cameras.

Frigate supports edgetpu and cpu as detector types. The device value should be specified according to the Documentation for the TensorFlow Lite Python API.

Note: There is no support for Nvidia GPUs to perform object detection with tensorflow. It can be used for ffmpeg decoding, but not object detection.

Single USB Coral:

detectors:
coral:
type: edgetpu
device: usb

Multiple USB Corals:

detectors:
coral1:
type: edgetpu
device: usb:0
coral2:
type: edgetpu
device: usb:1

Multiple PCIE/M.2 Corals:

detectors:
coral1:
type: edgetpu
device: pci:0
coral2:
type: edgetpu
device: pci:1

Mixing Corals:

detectors:
coral_usb:
type: edgetpu
device: usb
coral_pci:
type: edgetpu
device: pci

CPU Detectors (not recommended):

detectors:
cpu1:
type: cpu
cpu2:
type: cpu
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/false_positives/index.html b/configuration/false_positives/index.html index b4e0d5d68..05bf2d563 100644 --- a/configuration/false_positives/index.html +++ b/configuration/false_positives/index.html @@ -7,29 +7,29 @@ Reducing false positives | Frigate - - - - - - - + + + + + + + - - + +

Reducing false positives

Tune your object filters to adjust false positives: min_area, max_area, min_score, threshold.

For object filters in your configuration, any single detection below min_score will be ignored as a false positive. threshold is based on the median of the history of scores (padded to 3 values) for a tracked object. Consider the following frames when min_score is set to 0.6 and threshold is set to 0.85:

FrameCurrent ScoreScore HistoryComputed ScoreDetected Object
10.70.0, 0, 0.70.0No
20.550.0, 0.7, 0.00.0No
30.850.7, 0.0, 0.850.7No
40.900.7, 0.85, 0.95, 0.900.875Yes
50.880.7, 0.85, 0.95, 0.90, 0.880.88Yes
60.950.7, 0.85, 0.95, 0.90, 0.88, 0.950.89Yes

In frame 2, the score is below the min_score value, so frigate ignores it and it becomes a 0.0. The computed score is the median of the score history (padding to at least 3 values), and only when that computed score crosses the threshold is the object marked as a true positive. That happens in frame 4 in the example.

- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/index/index.html b/configuration/index/index.html index b9c755e66..195eca03e 100644 --- a/configuration/index/index.html +++ b/configuration/index/index.html @@ -7,29 +7,29 @@ Configuration | Frigate - - - - - - - + + + + + + + - - + +

Configuration

For HassOS installations, the default location for the config file is /config/frigate.yml.

For all other installations, the default location for the config file is '/config/config.yml'. This can be overridden with the CONFIG_FILE environment variable. Camera specific ffmpeg parameters are documented here.

It is recommended to start with a minimal configuration and add to it:

mqtt:
host: mqtt.server.com
cameras:
back:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
width: 1280
height: 720
fps: 5

Required#

mqtt#

mqtt:
# Required: host name
host: mqtt.server.com
# Optional: port (default: shown below)
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user: mqtt_user
# Optional: password
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password: password
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60

cameras#

Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the camera configuration page for a complete list of options.

cameras:
# Name of your camera
front_door:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
width: 1280
height: 720
fps: 5

Optional#

clips#

clips:
# Optional: Maximum length of time to retain video during long events. (default: shown below)
# NOTE: If an object is being tracked for longer than this amount of time, the cache
# will begin to expire and the resulting clip will be the last x seconds of the event.
max_seconds: 300
# Optional: size of tmpfs mount to create for cache files (default: not set)
# mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache
# NOTICE: Addon users must have Protection mode disabled for the addon when using this setting.
# Also, if you have mounted a tmpfs volume through docker, this value should not be set in your config.
tmpfs_cache_size: 256m
# Optional: Retention settings for clips (default: shown below)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15

ffmpeg#

ffmpeg:
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel warning
# Optional: global hwaccel args (default: shown below)
# NOTE: See hardware acceleration docs for your specific device
hwaccel_args: []
# Optional: global input args (default: shown below)
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect: -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for clips streams (default: shown below)
clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for rtmp streams (default: shown below)
rtmp: -c copy -f flv

objects#

Can be overridden at the camera level. For a list of available objects, see the objects documentation.

objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Optional: filters to reduce false positives for specific object types
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
min_area: 5000
# Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
max_area: 100000
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/nvdec/index.html b/configuration/nvdec/index.html index 4238b26cd..94917e048 100644 --- a/configuration/nvdec/index.html +++ b/configuration/nvdec/index.html @@ -7,16 +7,16 @@ nVidia hardware decoder | Frigate - - - - - - - + + + + + + + - - + +
@@ -34,15 +34,15 @@ processes:

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 12737 C ffmpeg 249MiB |
| 0 N/A N/A 12751 C ffmpeg 249MiB |
| 0 N/A N/A 12772 C ffmpeg 249MiB |
| 0 N/A N/A 12775 C ffmpeg 249MiB |
| 0 N/A N/A 12800 C ffmpeg 249MiB |
| 0 N/A N/A 12811 C ffmpeg 417MiB |
| 0 N/A N/A 12827 C ffmpeg 417MiB |
+-----------------------------------------------------------------------------+

To further improve performance, you can set ffmpeg to skip frames in the output, using the fps filter:

output_args:
- -filter:v
- fps=fps=5

This setting, for example, allows Frigate to consume my 10-15fps camera streams on my relatively low powered Haswell machine with relatively low cpu usage.

- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/objects/index.html b/configuration/objects/index.html index 4678d2fe1..22fd939aa 100644 --- a/configuration/objects/index.html +++ b/configuration/objects/index.html @@ -7,29 +7,29 @@ Default available objects | Frigate - - - - - - - + + + + + + + - - + +

Default available objects

By default, Frigate includes the following object models from the Google Coral test data.

  • person
  • bicycle
  • car
  • motorcycle
  • airplane
  • bus
  • train
  • car
  • boat
  • traffic light
  • fire hydrant
  • stop sign
  • parking meter
  • bench
  • bird
  • cat
  • dog
  • horse
  • sheep
  • cow
  • elephant
  • bear
  • zebra
  • giraffe
  • backpack
  • umbrella
  • handbag
  • tie
  • suitcase
  • frisbee
  • skis
  • snowboard
  • sports ball
  • kite
  • baseball bat
  • baseball glove
  • skateboard
  • surfboard
  • tennis racket
  • bottle
  • wine glass
  • cup
  • fork
  • knife
  • spoon
  • bowl
  • banana
  • apple
  • sandwich
  • orange
  • broccoli
  • carrot
  • hot dog
  • pizza
  • donut
  • cake
  • chair
  • couch
  • potted plant
  • bed
  • dining table
  • toilet
  • tv
  • laptop
  • mouse
  • remote
  • keyboard
  • cell phone
  • microwave
  • oven
  • toaster
  • sink
  • refrigerator
  • book
  • clock
  • vase
  • scissors
  • teddy bear
  • hair drier
  • toothbrush

Custom Models#

Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts:

  • CPU Model: /cpu_model.tflite
  • EdgeTPU Model: /edgetpu_model.tflite
  • Labels: /labelmap.txt

You also need to update the model width/height in the config if they differ from the defaults.

Customizing the Labelmap#

The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change:

  • Download the COCO labelmap
  • Modify the label names as desired. For example, change 7 truck to 7 car
  • Mount the new file at /labelmap.txt in the container with an additional volume
    -v ./config/labelmap.txt:/labelmap.txt
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/configuration/optimizing/index.html b/configuration/optimizing/index.html index d62679f78..640ddaba8 100644 --- a/configuration/optimizing/index.html +++ b/configuration/optimizing/index.html @@ -7,16 +7,16 @@ Optimizing performance | Frigate - - - - - - - + + + + + + + - - + +
@@ -24,15 +24,15 @@ NOTICE: If you are using the addon, ensure you turn off Protection mode for hardware acceleration.

ffmpeg:
hwaccel_args:
- -c:v
- h264_mmal

Raspberry Pi 3/4 (64-bit OS) NOTICE: If you are using the addon, ensure you turn off Protection mode for hardware acceleration.

ffmpeg:
hwaccel_args:
- -c:v
- h264_v4l2m2m

Intel-based CPUs (<10th Generation) via Quicksync (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)

ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p

Intel-based CPUs (>=10th Generation) via Quicksync (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)

ffmpeg:
hwaccel_args:
- -hwaccel
- qsv
- -qsv_device
- /dev/dri/renderD128

AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (https://trac.ffmpeg.org/wiki/Hardware/QuickSync) Note: You also need to set LIBVA_DRIVER_NAME=radeonsi as an environment variable on the container.

ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128

Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the nvidia NVDEC documentation for more details.

- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/contributing/index.html b/contributing/index.html index 4bba01169..c0d7b4585 100644 --- a/contributing/index.html +++ b/contributing/index.html @@ -7,29 +7,29 @@ Contributing | Frigate - - - - - - - + + + + + + + - - + +

Contributing

Getting the source#

Core, Web, Docker, and Documentation#

This repository holds the main Frigate application and all of its dependencies.

Fork blakeblackshear/frigate to your own GitHub profile, then clone the forked repo to your local machine.

From here, follow the guides for:

Frigate Home Assistant Addon#

This repository holds the Home Assistant Addon, for use with Home Assistant OS and compatible installations. It is the piece that allows you to run Frigate from your Home Assistant Supervisor tab.

Fork blakeblackshear/frigate-hass-addons to your own Github profile, then clone the forked repo to your local machine.

Frigate Home Assistant Integration#

This repository holds the custom integration that allows your Home Assistant installation to automatically create entities for your Frigate instance, whether you run that with the addon or in a separate Docker instance.

Fork blakeblackshear/frigate-hass-integration to your own GitHub profile, then clone the forked repo to your local machine.

Core#

Prerequisites#

Web Interface#

Prerequisites#

Making changes#

1. Set up a Frigate instance#

The Web UI requires an instance of Frigate to interact with for all of its data. You can either run an instance locally (recommended) or attach to a separate instance accessible on your network.

To run the local instance, follow the core development instructions.

If you won't be making any changes to the Frigate HTTP API, you can attach the web development server to any Frigate instance on your network. Skip this step and go to 3a.

2. Install dependencies#

cd web && npm install

3. Run the development server#

cd web && npm run start

3a. Run the development server against a non-local instance#

To run the development server against a non-local instance, you will need to provide an environment variable, SNOWPACK_PUBLIC_API_HOST that tells the web application how to connect to the Frigate API:

cd web && SNOWPACK_PUBLIC_API_HOST=http://<ip-address-to-your-frigate-instance>:5000 npm run start

4. Making changes#

The Web UI is built using Snowpack, Preact, and Tailwind CSS.

Light guidelines and advice:

  • Avoid adding more dependencies. The web UI intends to be lightweight and fast to load.
  • Do not make large sweeping changes. Open a discussion on GitHub for any large or architectural ideas.
  • Ensure lint passes. This command will ensure basic conformance to styles, applying as many automatic fixes as possible, including Prettier formatting.
npm run lint
  • Add to unit tests and ensure they pass. As much as possible, you should strive to increase test coverage whenever making changes. This will help ensure features do not accidentally become broken in the future.
npm run test
  • Test in different browsers. Firefox, Chrome, and Safari all have different quirks that make them unique targets to interact with.

Documentation#

Prerequisites#

Making changes#

1. Installation#

npm run install

2. Local Development#

npm run start

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

The docs are built using Docusaurus v2. Please refer to the Docusaurus docs for more information on how to modify Frigate's documentation.

3. Build (optional)#

npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/d5f64db3.94f45273.js b/d5f64db3.40f5b7bf.js similarity index 97% rename from d5f64db3.94f45273.js rename to d5f64db3.40f5b7bf.js index 6c861c2da..d72072ec5 100644 --- a/d5f64db3.94f45273.js +++ b/d5f64db3.40f5b7bf.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{96:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return l})),t.d(n,"metadata",(function(){return i})),t.d(n,"toc",(function(){return c})),t.d(n,"default",(function(){return s}));var a=t(3),o=t(7),r=(t(0),t(98)),l={id:"objects",title:"Default available objects",sidebar_label:"Available objects"},i={unversionedId:"configuration/objects",id:"configuration/objects",isDocsHomePage:!1,title:"Default available objects",description:"By default, Frigate includes the following object models from the Google Coral test data.",source:"@site/docs/configuration/objects.mdx",slug:"/configuration/objects",permalink:"/frigate/configuration/objects",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/objects.mdx",version:"current",sidebar_label:"Available objects",sidebar:"docs",previous:{title:"Reducing false positives",permalink:"/frigate/configuration/false_positives"},next:{title:"Advanced",permalink:"/frigate/configuration/advanced"}},c=[{value:"Custom Models",id:"custom-models",children:[{value:"Customizing the Labelmap",id:"customizing-the-labelmap",children:[]}]}],b={toc:c};function s(e){var n=e.components,t=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},b,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("p",null,"By default, Frigate includes the following object models from the Google Coral test data."),Object(r.b)("ul",null,"0 person\n1 bicycle\n2 car\n3 motorcycle\n4 airplane\n5 bus\n6 train\n7 car\n8 boat\n9 traffic light\n10 fire hydrant\n12 stop sign\n13 parking meter\n14 bench\n15 bird\n16 cat\n17 dog\n18 horse\n19 sheep\n20 cow\n21 elephant\n22 bear\n23 zebra\n24 giraffe\n26 backpack\n27 umbrella\n30 handbag\n31 tie\n32 suitcase\n33 frisbee\n34 skis\n35 snowboard\n36 sports ball\n37 kite\n38 baseball bat\n39 baseball glove\n40 skateboard\n41 surfboard\n42 tennis racket\n43 bottle\n45 wine glass\n46 cup\n47 fork\n48 knife\n49 spoon\n50 bowl\n51 banana\n52 apple\n53 sandwich\n54 orange\n55 broccoli\n56 carrot\n57 hot dog\n58 pizza\n59 donut\n60 cake\n61 chair\n62 couch\n63 potted plant\n64 bed\n66 dining table\n69 toilet\n71 tv\n72 laptop\n73 mouse\n74 remote\n75 keyboard\n76 cell phone\n77 microwave\n78 oven\n79 toaster\n80 sink\n81 refrigerator\n83 book\n84 clock\n85 vase\n86 scissors\n87 teddy bear\n88 hair drier\n89 toothbrush".split("\n").map((function(e){return Object(r.b)("li",null,e.replace(/^\d+\s+/,""))}))),Object(r.b)("h2",{id:"custom-models"},"Custom Models"),Object(r.b)("p",null,"Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"CPU Model: ",Object(r.b)("inlineCode",{parentName:"li"},"/cpu_model.tflite")),Object(r.b)("li",{parentName:"ul"},"EdgeTPU Model: ",Object(r.b)("inlineCode",{parentName:"li"},"/edgetpu_model.tflite")),Object(r.b)("li",{parentName:"ul"},"Labels: ",Object(r.b)("inlineCode",{parentName:"li"},"/labelmap.txt"))),Object(r.b)("p",null,"You also need to update the model width/height in the config if they differ from the defaults."),Object(r.b)("h3",{id:"customizing-the-labelmap"},"Customizing the Labelmap"),Object(r.b)("p",null,"The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Download the ",Object(r.b)("a",Object(a.a)({parentName:"li"},{href:"https://dl.google.com/coral/canned_models/coco_labels.txt"}),"COCO labelmap")),Object(r.b)("li",{parentName:"ul"},"Modify the label names as desired. For example, change ",Object(r.b)("inlineCode",{parentName:"li"},"7 truck")," to ",Object(r.b)("inlineCode",{parentName:"li"},"7 car")),Object(r.b)("li",{parentName:"ul"},"Mount the new file at ",Object(r.b)("inlineCode",{parentName:"li"},"/labelmap.txt")," in the container with an additional volume",Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),"-v ./config/labelmap.txt:/labelmap.txt\n")))))}s.isMDXComponent=!0},98:function(e,n,t){"use strict";t.d(n,"a",(function(){return u})),t.d(n,"b",(function(){return m}));var a=t(0),o=t.n(a);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var b=o.a.createContext({}),s=function(e){var n=o.a.useContext(b),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=s(e.components);return o.a.createElement(b.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},d=o.a.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,b=c(e,["components","mdxType","originalType","parentName"]),u=s(t),d=a,m=u["".concat(l,".").concat(d)]||u[d]||p[d]||r;return t?o.a.createElement(m,i(i({ref:n},b),{},{components:t})):o.a.createElement(m,i({ref:n},b))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,l=new Array(r);l[0]=d;var i={};for(var c in n)hasOwnProperty.call(n,c)&&(i[c]=n[c]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var b=2;b=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var b=o.a.createContext({}),s=function(e){var n=o.a.useContext(b),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=s(e.components);return o.a.createElement(b.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},d=o.a.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,b=c(e,["components","mdxType","originalType","parentName"]),u=s(t),d=a,m=u["".concat(l,".").concat(d)]||u[d]||p[d]||r;return t?o.a.createElement(m,i(i({ref:n},b),{},{components:t})):o.a.createElement(m,i({ref:n},b))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,l=new Array(r);l[0]=d;var i={};for(var c in n)hasOwnProperty.call(n,c)&&(i[c]=n[c]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var b=2;bmqtt",id:"mqtt",children:[]},{value:"cameras",id:"cameras",children:[]},{value:"Optional",id:"optional",children:[{value:"clips",id:"clips",children:[]},{value:"ffmpeg",id:"ffmpeg",children:[]},{value:"objects",id:"objects",children:[]}]}],s={toc:l};function p(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"For HassOS installations, the default location for the config file is ",Object(r.b)("inlineCode",{parentName:"p"},"/config/frigate.yml"),"."),Object(r.b)("p",null,"For all other installations, the default location for the config file is '/config/config.yml'. This can be overridden with the ",Object(r.b)("inlineCode",{parentName:"p"},"CONFIG_FILE")," environment variable. Camera specific ffmpeg parameters are documented ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/frigate/configuration/cameras"}),"here"),"."),Object(r.b)("p",null,"It is recommended to start with a minimal configuration and add to it:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"mqtt:\n host: mqtt.server.com\ncameras:\n back:\n ffmpeg:\n inputs:\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n roles:\n - detect\n - rtmp\n width: 1280\n height: 720\n fps: 5\n")),Object(r.b)("h2",{id:"required"},"Required"),Object(r.b)("h2",{id:"mqtt"},Object(r.b)("inlineCode",{parentName:"h2"},"mqtt")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"mqtt:\n # Required: host name\n host: mqtt.server.com\n # Optional: port (default: shown below)\n port: 1883\n # Optional: topic prefix (default: shown below)\n # WARNING: must be unique if you are running multiple instances\n topic_prefix: frigate\n # Optional: client id (default: shown below)\n # WARNING: must be unique if you are running multiple instances\n client_id: frigate\n # Optional: user\n user: mqtt_user\n # Optional: password\n # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.\n # eg. password: '{FRIGATE_MQTT_PASSWORD}'\n password: password\n # Optional: interval in seconds for publishing stats (default: shown below)\n stats_interval: 60\n")),Object(r.b)("h2",{id:"cameras"},Object(r.b)("inlineCode",{parentName:"h2"},"cameras")),Object(r.b)("p",null,"Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/frigate/configuration/cameras"}),"camera configuration page")," for a complete list of options."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"cameras:\n # Name of your camera\n front_door:\n ffmpeg:\n inputs:\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n roles:\n - detect\n - rtmp\n width: 1280\n height: 720\n fps: 5\n")),Object(r.b)("h2",{id:"optional"},"Optional"),Object(r.b)("h3",{id:"clips"},Object(r.b)("inlineCode",{parentName:"h3"},"clips")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"clips:\n # Optional: Maximum length of time to retain video during long events. (default: shown below)\n # NOTE: If an object is being tracked for longer than this amount of time, the cache\n # will begin to expire and the resulting clip will be the last x seconds of the event.\n max_seconds: 300\n # Optional: size of tmpfs mount to create for cache files (default: not set)\n # mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache\n # NOTICE: Addon users must have Protection mode disabled for the addon when using this setting.\n # Also, if you have mounted a tmpfs volume through docker, this value should not be set in your config.\n tmpfs_cache_size: 256m\n # Optional: Retention settings for clips (default: shown below)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n")),Object(r.b)("h3",{id:"ffmpeg"},Object(r.b)("inlineCode",{parentName:"h3"},"ffmpeg")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n # Optional: global ffmpeg args (default: shown below)\n global_args: -hide_banner -loglevel warning\n # Optional: global hwaccel args (default: shown below)\n # NOTE: See hardware acceleration docs for your specific device\n hwaccel_args: []\n # Optional: global input args (default: shown below)\n input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1\n # Optional: global output args\n output_args:\n # Optional: output args for detect streams (default: shown below)\n detect: -f rawvideo -pix_fmt yuv420p\n # Optional: output args for record streams (default: shown below)\n record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an\n # Optional: output args for clips streams (default: shown below)\n clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an\n # Optional: output args for rtmp streams (default: shown below)\n rtmp: -c copy -f flv\n")),Object(r.b)("h3",{id:"objects"},Object(r.b)("inlineCode",{parentName:"h3"},"objects")),Object(r.b)("p",null,"Can be overridden at the camera level. For a list of available objects, see the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/frigate/configuration/objects"}),"objects documentation"),"."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"objects:\n # Optional: list of objects to track from labelmap.txt (default: shown below)\n track:\n - person\n # Optional: filters to reduce false positives for specific object types\n filters:\n person:\n # Optional: minimum width*height of the bounding box for the detected object (default: 0)\n min_area: 5000\n # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)\n max_area: 100000\n # Optional: minimum score for the object to initiate tracking (default: shown below)\n min_score: 0.5\n # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)\n threshold: 0.7\n")))}p.isMDXComponent=!0},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var a=n(0),o=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),p=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=p(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=a,d=u["".concat(i,".").concat(f)]||u[f]||m[f]||r;return n?o.a.createElement(d,c(c({ref:t},s),{},{components:n})):o.a.createElement(d,c({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;smqtt",id:"mqtt",children:[]},{value:"cameras",id:"cameras",children:[]},{value:"Optional",id:"optional",children:[{value:"clips",id:"clips",children:[]},{value:"ffmpeg",id:"ffmpeg",children:[]},{value:"objects",id:"objects",children:[]}]}],s={toc:l};function p(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"For HassOS installations, the default location for the config file is ",Object(r.b)("inlineCode",{parentName:"p"},"/config/frigate.yml"),"."),Object(r.b)("p",null,"For all other installations, the default location for the config file is '/config/config.yml'. This can be overridden with the ",Object(r.b)("inlineCode",{parentName:"p"},"CONFIG_FILE")," environment variable. Camera specific ffmpeg parameters are documented ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/frigate/configuration/cameras"}),"here"),"."),Object(r.b)("p",null,"It is recommended to start with a minimal configuration and add to it:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"mqtt:\n host: mqtt.server.com\ncameras:\n back:\n ffmpeg:\n inputs:\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n roles:\n - detect\n - rtmp\n width: 1280\n height: 720\n fps: 5\n")),Object(r.b)("h2",{id:"required"},"Required"),Object(r.b)("h2",{id:"mqtt"},Object(r.b)("inlineCode",{parentName:"h2"},"mqtt")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"mqtt:\n # Required: host name\n host: mqtt.server.com\n # Optional: port (default: shown below)\n port: 1883\n # Optional: topic prefix (default: shown below)\n # WARNING: must be unique if you are running multiple instances\n topic_prefix: frigate\n # Optional: client id (default: shown below)\n # WARNING: must be unique if you are running multiple instances\n client_id: frigate\n # Optional: user\n user: mqtt_user\n # Optional: password\n # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.\n # eg. password: '{FRIGATE_MQTT_PASSWORD}'\n password: password\n # Optional: interval in seconds for publishing stats (default: shown below)\n stats_interval: 60\n")),Object(r.b)("h2",{id:"cameras"},Object(r.b)("inlineCode",{parentName:"h2"},"cameras")),Object(r.b)("p",null,"Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/frigate/configuration/cameras"}),"camera configuration page")," for a complete list of options."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"cameras:\n # Name of your camera\n front_door:\n ffmpeg:\n inputs:\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n roles:\n - detect\n - rtmp\n width: 1280\n height: 720\n fps: 5\n")),Object(r.b)("h2",{id:"optional"},"Optional"),Object(r.b)("h3",{id:"clips"},Object(r.b)("inlineCode",{parentName:"h3"},"clips")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"clips:\n # Optional: Maximum length of time to retain video during long events. (default: shown below)\n # NOTE: If an object is being tracked for longer than this amount of time, the cache\n # will begin to expire and the resulting clip will be the last x seconds of the event.\n max_seconds: 300\n # Optional: size of tmpfs mount to create for cache files (default: not set)\n # mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache\n # NOTICE: Addon users must have Protection mode disabled for the addon when using this setting.\n # Also, if you have mounted a tmpfs volume through docker, this value should not be set in your config.\n tmpfs_cache_size: 256m\n # Optional: Retention settings for clips (default: shown below)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n")),Object(r.b)("h3",{id:"ffmpeg"},Object(r.b)("inlineCode",{parentName:"h3"},"ffmpeg")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n # Optional: global ffmpeg args (default: shown below)\n global_args: -hide_banner -loglevel warning\n # Optional: global hwaccel args (default: shown below)\n # NOTE: See hardware acceleration docs for your specific device\n hwaccel_args: []\n # Optional: global input args (default: shown below)\n input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1\n # Optional: global output args\n output_args:\n # Optional: output args for detect streams (default: shown below)\n detect: -f rawvideo -pix_fmt yuv420p\n # Optional: output args for record streams (default: shown below)\n record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an\n # Optional: output args for clips streams (default: shown below)\n clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an\n # Optional: output args for rtmp streams (default: shown below)\n rtmp: -c copy -f flv\n")),Object(r.b)("h3",{id:"objects"},Object(r.b)("inlineCode",{parentName:"h3"},"objects")),Object(r.b)("p",null,"Can be overridden at the camera level. For a list of available objects, see the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/frigate/configuration/objects"}),"objects documentation"),"."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"objects:\n # Optional: list of objects to track from labelmap.txt (default: shown below)\n track:\n - person\n # Optional: filters to reduce false positives for specific object types\n filters:\n person:\n # Optional: minimum width*height of the bounding box for the detected object (default: 0)\n min_area: 5000\n # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)\n max_area: 100000\n # Optional: minimum score for the object to initiate tracking (default: shown below)\n min_score: 0.5\n # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)\n threshold: 0.7\n")))}p.isMDXComponent=!0},99:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var a=n(0),o=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),p=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=p(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=a,d=u["".concat(i,".").concat(f)]||u[f]||m[f]||r;return n?o.a.createElement(d,c(c({ref:t},s),{},{components:n})):o.a.createElement(d,c({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;s Recommended hardware | Frigate - - - - - - - + + + + + + + - - + +

Recommended hardware

Cameras#

Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and HomeAssistant. It is also helpful if your camera supports multiple substreams to allow different resolutions to be used for detection, streaming, clips, and recordings without re-encoding.

Computer#

NameInference SpeedNotes
Atomic Pi16msGood option for a dedicated low power board with a small number of cameras. Can leverage Intel QuickSync for stream decoding.
Intel NUC NUC7i3BNK8-10msGreat performance. Can handle many cameras at 5fps depending on typical amounts of motion.
BMAX B2 Plus10-12msGood balance of performance and cost. Also capable of running many other services at the same time as frigate.
Minisforum GK419-10msGreat alternative to a NUC with dual Gigabit NICs. Easily handles several 1080p cameras.
Raspberry Pi 3B (32bit)60msCan handle a small number of cameras, but the detection speeds are slow due to USB 2.0.
Raspberry Pi 4 (32bit)15-20msCan handle a small number of cameras. The 2GB version runs fine.
Raspberry Pi 4 (64bit)10-15msCan handle a small number of cameras. The 2GB version runs fine.

Unraid#

Many people have powerful enough NAS devices or home servers to also run docker. There is a Unraid Community App. To install make sure you have the community app plugin here. Then search for "Frigate" in the apps section within Unraid - you can see the online store here

NameInference SpeedNotes
M2 Coral Edge TPU6.2msInstall the Coral plugin from Unraid Community App Center info here
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/how-it-works/index.html b/how-it-works/index.html index d283bc911..bcb69bca9 100644 --- a/how-it-works/index.html +++ b/how-it-works/index.html @@ -7,29 +7,29 @@ How Frigate Works | Frigate - - - - - - - + + + + + + + - - + +
- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/index.html b/index.html index 46fd341c0..52e8ed9d7 100644 --- a/index.html +++ b/index.html @@ -7,29 +7,29 @@ Frigate | Frigate - - - - - - - + + + + + + + - - + +

Your Docusaurus site did not load properly.

A very common reason is a wrong site baseUrl configuration.

Current configured baseUrl = /frigate/

We suggest trying baseUrl =

Frigate

A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.

Use of a Google Coral Accelerator is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead.

  • Tight integration with HomeAssistant via a custom component
  • Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary
  • Leverages multiprocessing heavily with an emphasis on realtime over processing every frame
  • Uses a very low overhead motion detection to determine where to run object detection
  • Object detection with TensorFlow runs in separate processes for maximum FPS
  • Communicates over MQTT for easy integration into other systems
  • 24/7 recording
  • Re-streaming via RTMP to reduce the number of connections to your camera

Screenshots#

Media Browser

Notification

- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/installation/index.html b/installation/index.html index 85c93be38..faafa2d20 100644 --- a/installation/index.html +++ b/installation/index.html @@ -7,29 +7,29 @@ Installation | Frigate - - - - - - - + + + + + + + - - + +

Installation

Frigate is a Docker container that can be run on any Docker host including as a HassOS Addon. See instructions below for installing the HassOS addon.

For HomeAssistant users, there is also a custom component (aka integration). This custom component adds tighter integration with HomeAssistant by automatically setting up camera entities, sensors, media browser for clips and recordings, and a public API to simplify notifications.

Note that HassOS Addons and custom components are different things. If you are already running Frigate with Docker directly, you do not need the Addon since the Addon would run another instance of Frigate.

HassOS Addon#

HassOS users can install via the addon repository. Frigate requires an MQTT server.

  1. Navigate to Supervisor > Add-on Store > Repositories
  2. Add https://github.com/blakeblackshear/frigate-hass-addons
  3. Setup your network configuration in the Configuration tab if deisred
  4. Create the file frigate.yml in your config directory with your detailed Frigate conifguration
  5. Start the addon container
  6. If you are using hardware acceleration for ffmpeg, you will need to disable "Protection mode"

Docker#

Make sure you choose the right image for your architecture:

ArchImage Name
amd64blakeblackshear/frigate:stable-amd64
amd64nvidiablakeblackshear/frigate:stable-amd64nvidia
armv7blakeblackshear/frigate:stable-armv7
aarch64blakeblackshear/frigate:stable-aarch64

It is recommended to run with docker-compose:

version: '3.9'
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: blakeblackshear/frigate:<specify_version_tag>
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- <path_to_config_file>:/config/config.yml:ro
- <path_to_directory_for_media>:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- '5000:5000'
- '1935:1935' # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: 'password'

If you can't use docker compose, you can run the container with something similar to this:

docker run -d \
--name frigate \
--restart=unless-stopped \
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
--device /dev/bus/usb:/dev/bus/usb \
--device /dev/dri/renderD128 \
-v <path_to_directory_for_media>:/media/frigate \
-v <path_to_config_file>:/config/config.yml:ro \
-v /etc/localtime:/etc/localtime:ro \
-e FRIGATE_RTSP_PASSWORD='password' \
-p 5000:5000 \
-p 1935:1935 \
blakeblackshear/frigate:<specify_version_tag>

Calculating shm-size#

The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.

You can calculate the necessary shm-size for each camera with the following formula:

(width * height * 1.5 * 7 + 270480)/1048576 = <shm size in mb>

The shm size cannot be set per container for HomeAssistant Addons. You must set default-shm-size in /etc/docker/daemon.json to increase the default shm size. This will increase the shm size for all of your docker containers. This may or may not cause issues with your setup. https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file

Kubernetes#

Use the helm chart.

Virtualization#

For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices.

Proxmox#

Some people have had success running Frigate in LXC directly with the following config:

arch: amd64
cores: 2
features: nesting=1
hostname: FrigateLXC
memory: 4096
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth
ostype: debian
rootfs: local-lvm:vm-115-disk-0,size=12G
swap: 512
lxc.cgroup.devices.allow: c 189:385 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:

ESX#

For details on running Frigate under ESX, see details here.

- - - - - - - + + + + + + + - - + + \ No newline at end of file diff --git a/main.7ef42414.js b/main.7ef42414.js deleted file mode 100644 index f447485e7..000000000 --- a/main.7ef42414.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.7ef42414.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],[function(e,t,n){"use strict";e.exports=n(39)},function(e,t,n){e.exports=n(43)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return j})),n.d(t,"g",(function(){return L})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return O})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return z})),n.d(t,"m",(function(){return U})),n.d(t,"n",(function(){return B})),n.d(t,"o",(function(){return D}));var r=n(4),a=n(0),i=n.n(a),o=(n(1),n(6)),l=n(20),u=n(5),s=n(3),c=n(21),f=n.n(c),d=(n(28),n(7)),p=n(33),m=n.n(p),g=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History"),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),b=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return i.a.createElement(h.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(g.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i.a.Component);var v=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a=0;d--){var p=o[d];"."===p?i(o,d):".."===p?(i(o,d),f++):f&&(i(o,d),f--)}if(!s)for(;f--;f)o.unshift("..");!s||""===o[0]||o[0]&&a(o[0])||o.unshift("");var m=o.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),a=l(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(5);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function g(e,t,n,a){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),a?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=o(i.pathname,a.pathname)):i.pathname=a.pathname:i.pathname||(i.pathname="/"),i}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):a(!0):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),f({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=g(e,t,d(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,f({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(a[n]=e[n]);return a}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(2),a=n(3),i=n(0),o=n.n(i);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?Object(r.j)(t,e):n.length?n[n.length-1].match:r.e.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&l(e.routes,t,n)),a})),n}function u(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.a.createElement(r.g,n,e.map((function(e,n){return o.a.createElement(r.d,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(a.a)({},n,{},t,{route:e})):o.a.createElement(e.component,Object(a.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&!!window.screen};t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return v})),n.d(t,"e",(function(){return k}));var r=n(2);n.d(t,"d",(function(){return r.a})),n.d(t,"f",(function(){return r.b})),n.d(t,"g",(function(){return r.c})),n.d(t,"h",(function(){return r.d})),n.d(t,"i",(function(){return r.e})),n.d(t,"j",(function(){return r.f})),n.d(t,"k",(function(){return r.g})),n.d(t,"l",(function(){return r.i})),n.d(t,"m",(function(){return r.j})),n.d(t,"n",(function(){return r.k})),n.d(t,"o",(function(){return r.l})),n.d(t,"p",(function(){return r.m})),n.d(t,"q",(function(){return r.n})),n.d(t,"r",(function(){return r.o}));var a=n(4),i=n(0),o=n.n(i),l=n(6),u=(n(1),n(3)),s=n(7),c=n(5),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a
'};function a(e,t,n){return en?n:e}function i(e){return 100*(-1+e)}function o(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+i(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(e)+"%,0)"}:{"margin-left":i(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var i=n.render(!t),s=i.querySelector(r.barSelector),c=r.speed,f=r.easing;return i.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),u(s,o(e,c,f)),1===e?(u(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout((function(){u(i,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,o=t.querySelector(r.barSelector),l=e?"-100":i(n.status||0),s=document.querySelector(r.parent);return u(o,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),s!=document.body&&c(s,"nprogress-custom-parent"),s.appendChild(t),t},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),u=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+i)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,a[1],a[2])}}();function s(e,t){return("string"==typeof e?e:d(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=d(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function f(e,t){var n,r=d(e);s(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function d(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=a)},,,function(e,t,n){var r={"./":48};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=18},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(0),u=n(1),s=[],c=[];function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function d(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=f(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function p(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var f,d;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:p,webpack:null,modules:null},t),g=null;function h(){return g||(g=e(m.loader)),g.promise}return s.push(h),"function"==typeof m.webpack&&c.push((function(){if(e=m.webpack,"object"===r(n.m)&&e().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return h();var e})),d=f=function(t){function n(r){a(this,n);var o=i(this,t.call(this,r));return o.retry=function(){o.setState({error:null,loading:!0,timedOut:!1}),g=e(m.loader),o._loadModule()},h(),o.state={error:g.error,pastDelay:!1,timedOut:!1,loading:g.loading,loaded:g.loaded},o}return o(n,t),n.preload=function(){return h()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.loadable.report(t)})),g.loading){"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),m.timeout));var t=function(){e._mounted&&(e.setState({error:g.error,loaded:g.loaded,loading:g.loading}),e._clearTimeouts())};g.promise.then((function(){t()})).catch((function(e){t()}))}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),f.contextTypes={loadable:u.shape({report:u.func.isRequired})},d}function g(e){return m(f,e)}g.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(d,e)};var h=function(e){function t(){return a(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return b(e)}))}h.propTypes={report:u.func.isRequired},h.childContextTypes={loadable:u.shape({report:u.func.isRequired}).isRequired},g.Capture=h,g.preloadAll=function(){return new Promise((function(e,t){b(s).then(e,t)}))},g.preloadReady=function(){return new Promise((function(e,t){b(c).then(e,e)}))},e.exports=g},function(e,t,n){"use strict";(function(e){var r=n(0),a=n.n(r),i=n(4),o=n(1),l=n.n(o),u=1073741823,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=a.a.createContext||function(e,t){var n,a,o,f="__create-react-context-"+((s[o="__global_unique_id__"]=(s[o]||0)+1)+"__"),d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[f]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((i=r)===(o=a)?0!==i||1/i==1/o:i!=i&&o!=o)?n=0:(n="function"==typeof t?t(r,a):u,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,o},r.render=function(){return this.props.children},n}(r.Component);d.childContextTypes=((n={})[f]=l.a.object.isRequired,n);var p=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?u:t},r.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?u:e},r.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},r.getValue=function(){return this.context[f]?this.context[f].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return p.contextTypes=((a={})[f]=l.a.object,a),{Provider:d,Consumer:p}};t.a=f}).call(this,n(27))},function(e,t,n){var r=n(45);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=d;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,o=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var f=n[0],d=n[1],p=n.index;if(l+=e.slice(o,p),o=p+f.length,d)l+=d[1];else{var m=e[o],g=n[2],h=n[3],b=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=g&&null!=m&&m!==g,E="+"===y||"*"===y,S="?"===y||"*"===y,T=n[2]||c,x=b||v;r.push({name:h||i++,prefix:g||"",delimiter:T,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:x?s(x):w?".*":"[^"+u(T)+"]+?"})}}return oe.length)return;if(!(k instanceof u)){if(g&&y!=t.length-1){if(d.lastIndex=w,!(O=d.exec(e)))break;for(var E=O.index+(m?O[1].length:0),S=O.index+O[0].length,T=y,x=w,C=t.length;T=(x+=t[T].length)&&(++y,w=x);if(t[y]instanceof u)continue;_=T-y,k=e.slice(w,x),O.index-=w}else{d.lastIndex=0;var O=d.exec(k),_=1}if(O){m&&(h=O[1]?O[1].length:0),S=(E=O.index+h)+(O=O[0].slice(h)).length;var A=k.slice(0,E),P=k.slice(S),R=[y,_];A&&(++y,w+=A.length,R.push(A));var N=new u(s,p?a.tokenize(O,p):O,b,O,g);if(R.push(N),P&&R.push(P),Array.prototype.splice.apply(t,R),1!=_&&a.matchGrammar(e,t,n,y,w,!0,s),o)break}else if(o)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],i=t.rest;if(i){for(var o in i)t[o]=i[o];delete t.rest}return a.matchGrammar(e,r,t,0,0,!1),r}},(i=a.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a}).stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map((function(n){return i.stringify(n,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var o="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,o)}var l=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(l?" "+l:"")+">"+r.content+""},a);o.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:o.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:o.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:r},o.languages.insertBefore("markup","cdata",a)}}),o.languages.xml=o.languages.extend("markup",{}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.languages.markup,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=n.variable[1].inside,i=0;i=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},o.languages.c=o.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),o.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete o.languages.c.boolean,o.languages.cpp=o.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),o.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(o),o.languages.css.selector={pattern:o.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},o.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),o.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}),o.languages.javascript=o.languages.extend("clike",{"class-name":[o.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),o.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,o.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:o.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:o.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:o.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:o.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),o.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:o.languages.javascript}},string:/[\s\S]+/}}}),o.languages.markup&&o.languages.markup.tag.addInlined("script","javascript"),o.languages.js=o.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var a=[],i=0;i0&&a[a.length-1].tagName===n(o.content[0].content[1])&&a.pop():"/>"===o.content[o.content.length-1].content||a.push({tagName:n(o.content[0].content[1]),openedBraces:0}):a.length>0&&"punctuation"===o.type&&"{"===o.content?a[a.length-1].openedBraces++:a.length>0&&a[a.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?a[a.length-1].openedBraces--:l=!0),(l||"string"==typeof o)&&a.length>0&&0===a[a.length-1].openedBraces){var u=n(o);i0&&("string"==typeof t[i-1]||"plain-text"===t[i-1].type)&&(u=n(t[i-1])+u,t.splice(i-1,1),i--),t[i]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&r(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(o),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){"string"==typeof t&&(t=[t]),t.forEach((function(t){!function(t,n){var r="doc-comment",a=e.languages[t];if(a){var i=a[r];if(!i){var o={"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,alias:"comment"}};i=(a=e.languages.insertBefore(t,"comment",o))[r]}if(i instanceof RegExp&&(i=a[r]={pattern:i}),Array.isArray(i))for(var l=0,u=i.length;l>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(o),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,i){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof i&&!i(e))return e;for(var a,l=o.length;-1!==n.code.indexOf(a=t(r,l));)++l;return o[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,i=Object.keys(n.tokenStack);!function o(l){for(var u=0;u=i.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=i[a],f=n.tokenStack[c],d="string"==typeof s?s:s.content,p=t(r,c),m=d.indexOf(p);if(m>-1){++a;var g=d.substring(0,m),h=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),b=d.substring(m+p.length),v=[];g&&v.push.apply(v,o([g])),v.push(h),b&&v.push.apply(v,o([b])),"string"==typeof s?l.splice.apply(l,[u,1].concat(v)):s.content=v}}else s.content&&o(s.content)}return l}(n.tokens)}}}})}(o),function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),e.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var t={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:t}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:t}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(o),function(e){var t=e.languages.javascript,n=/{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})+}/.source,r="(@(?:param|arg|argument|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/[$\w\xA0-\uFFFF.]+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[[$\w\xA0-\uFFFF.]+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{punctuation:/[.,:?=<>|{}()[\]]/}},{pattern:/(@(?:augments|extends|class|interface|memberof!?|this)\s+)[A-Z]\w*(?:\.[A-Z]\w*)*/,lookbehind:!0,inside:{punctuation:/\./}}],example:{pattern:/(@example\s+)[^@]+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^(\s*(?:\*\s*)?).+$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(o),o.languages.actionscript=o.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),o.languages.actionscript["class-name"].alias="function",o.languages.markup&&o.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:{rest:o.languages.markup}}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(o),function(e){e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],n=0;n))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/,lookbehind:!0})}(o),o.languages.n4js=o.languages.extend("javascript",{keyword:/\b(?:any|Array|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),o.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),o.languages.n4jsd=o.languages.n4js,o.languages.typescript=o.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),o.languages.ts=o.languages.typescript,function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],i=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function u(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function s(t){var n={};n["interpolation-punctuation"]=a;var i=e.tokenize(t,n);if(3===i.length){var o=[1,1];o.push.apply(o,u(i[1],e.languages.javascript,"javascript")),i.splice.apply(i,o)}return new e.Token("interpolation",i,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(i),lookbehind:!0}}),o=0,c={},f=u(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(o++,r)););return c[n]=a,n})).join(""),n,r),d=Object.keys(c);return o=0,function e(t){for(var n=0;n=d.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=d[o],i="string"==typeof r?r:r.content,l=i.indexOf(a);if(-1!==l){++o;var u=i.substring(0,l),f=s(c[a]),p=i.substring(l+a.length),m=[];if(u&&m.push(u),m.push(f),p){var g=[p];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(f),new e.Token(r,f,"language-"+r,t)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:md|markdown)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),t].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function d(e){return"string"==typeof e?e:Array.isArray(e)?e.map(d).join(""):d(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in f&&function t(n){for(var r=0,a=n.length;r/g,t),n&&(e=e+"|"+e.replace(/_/g,"\\*")),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\r?\n|\r)|$)/.source.replace(/__/g,r),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\r?\n|\r)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/__(?:(?!_)|_(?:(?!_))+_)+__/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/_(?:(?!_)|__(?:(?!_))+__)+_/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+?\2/.source,!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source,!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(o),o.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m},o.languages.go=o.languages.extend("clike",{keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete o.languages.go["class-name"],function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}))}(o),o.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},o.languages.less=o.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),o.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}),o.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},o.languages.objectivec=o.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete o.languages.objectivec["class-name"],o.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,type:{pattern:/\B['`]\w*/,alias:"variable"},directive:{pattern:/\B#\w+/,alias:"function"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/,punctuation:/[(){}\[\]|_.,:;]/},o.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},o.languages.python["string-interpolation"].inside.interpolation.inside.rest=o.languages.python,o.languages.py=o.languages.python,o.languages.reason=o.languages.extend("clike",{comment:{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),o.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete o.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(o),o.languages.scss=o.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),o.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),o.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),o.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),o.languages.scss.atrule.inside.rest=o.languages.scss,o.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={comment:{pattern:/(^|[^\\])(\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(o);var l=o.util.clone(o.languages.typescript);o.languages.tsx=o.languages.extend("jsx",l),o.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},o.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},o.languages.yml=o.languages.yaml,t.a=o},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(40)},function(e,t,n){"use strict";var r=n(8);t.a=r.b},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=n(46)},function(e){e.exports=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/frigate/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/frigate/","mainDocId":"index","docs":[{"id":"configuration/advanced","path":"/frigate/configuration/advanced","sidebar":"docs"},{"id":"configuration/cameras","path":"/frigate/configuration/cameras","sidebar":"docs"},{"id":"configuration/detectors","path":"/frigate/configuration/detectors","sidebar":"docs"},{"id":"configuration/false_positives","path":"/frigate/configuration/false_positives","sidebar":"docs"},{"id":"configuration/index","path":"/frigate/configuration/index","sidebar":"docs"},{"id":"configuration/nvdec","path":"/frigate/configuration/nvdec"},{"id":"configuration/objects","path":"/frigate/configuration/objects","sidebar":"docs"},{"id":"configuration/optimizing","path":"/frigate/configuration/optimizing","sidebar":"docs"},{"id":"contributing","path":"/frigate/contributing","sidebar":"docs"},{"id":"hardware","path":"/frigate/hardware","sidebar":"docs"},{"id":"how-it-works","path":"/frigate/how-it-works","sidebar":"docs"},{"id":"index","path":"/frigate/","sidebar":"docs"},{"id":"installation","path":"/frigate/installation","sidebar":"docs"},{"id":"mdx","path":"/frigate/mdx"},{"id":"troubleshooting","path":"/frigate/troubleshooting","sidebar":"docs"},{"id":"usage/api","path":"/frigate/usage/api","sidebar":"docs"},{"id":"usage/home-assistant","path":"/frigate/usage/home-assistant","sidebar":"docs"},{"id":"usage/mqtt","path":"/frigate/usage/mqtt","sidebar":"docs"},{"id":"usage/web","path":"/frigate/usage/web","sidebar":"docs"}]}]}}}')},function(e){e.exports=JSON.parse('{"defaultLocale":"en","locales":["en"],"localeConfigs":{"en":{"label":"en"}},"currentLocale":"en"}')},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse('{"docusaurusVersion":"2.0.0-alpha.70","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.0.0-alpha.70"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.0.0-alpha.70"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.0.0-alpha.70"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.0.0-alpha.70"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.0.0-alpha.70"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"2.0.0-alpha.70"},"labelmap":{"type":"project"}}}')},function(e,t,n){"use strict";var r=n(28),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?o:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=o;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var o=c(n);f&&(o=o.concat(f(n)));for(var l=u(t),g=u(n),h=0;h=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},W=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},V=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},K=function(e){var t=Z(e,w.TITLE),n=Z(e,F);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=Z(e,I);return t||r||void 0},Q=function(e){return Z(e,D)||function(){}},Y=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return H({},e,t)}),{})},X=function(e,t){return t.filter((function(e){return void 0!==e[w.BASE]})).map((function(e){return e[w.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},ee=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){ee(e)}),0)}),te=function(e){return clearTimeout(e)},ne="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||ee:e.requestAnimationFrame||ee,re="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||te:e.cancelAnimationFrame||te,ae=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},ie=null,oe=function(e,t){var n=e.baseTag,r=e.bodyAttributes,a=e.htmlAttributes,i=e.linkTags,o=e.metaTags,l=e.noscriptTags,u=e.onChangeClientState,s=e.scriptTags,c=e.styleTags,f=e.title,d=e.titleAttributes;se(w.BODY,r),se(w.HTML,a),ue(f,d);var p={baseTag:ce(w.BASE,n),linkTags:ce(w.LINK,i),metaTags:ce(w.META,o),noscriptTags:ce(w.NOSCRIPT,l),scriptTags:ce(w.SCRIPT,s),styleTags:ce(w.STYLE,c)},m={},g={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(m[e]=n),r.length&&(g[e]=p[e].oldTags)})),t&&t(),u(e,m,g)},le=function(e){return Array.isArray(e)?e.join(""):e},ue=function(e,t){void 0!==e&&document.title!==e&&(document.title=le(e)),se(w.TITLE,t)},se=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(U),a=r?r.split(","):[],i=[].concat(a),o=Object.keys(t),l=0;l=0;f--)n.removeAttribute(i[f]);a.length===i.length?n.removeAttribute(U):n.getAttribute(U)!==o.join(",")&&n.setAttribute(U,o.join(","))}},ce=function(e,t){var n=document.head||document.querySelector(w.HEAD),r=n.querySelectorAll(e+"["+"data-react-helmet]"),a=Array.prototype.slice.call(r),i=[],o=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===x)n.innerHTML=t.innerHTML;else if(r===E)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var l=void 0===t[r]?"":t[r];n.setAttribute(r,l)}n.setAttribute(U,"true"),a.some((function(e,t){return o=t,n.isEqualNode(e)}))?a.splice(o,1):i.push(n)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return n.appendChild(e)})),{oldTags:a,newTags:i}},fe=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[N[n]||n]=e[n],t}),t)},pe=function(e,t,n){switch(e){case w.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[U]=!0,a=de(n,r),[m.a.createElement(w.TITLE,a,e)];var e,n,r,a},toString:function(){return function(e,t,n,r){var a=fe(n),i=le(t);return a?"<"+e+' data-react-helmet="true" '+a+">"+V(i,r)+"":"<"+e+' data-react-helmet="true">'+V(i,r)+""}(e,t.title,t.titleAttributes,n)}};case b:case v:return{toComponent:function(){return de(t)},toString:function(){return fe(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,a=((r={key:n})[U]=!0,r);return Object.keys(t).forEach((function(e){var n=N[e]||e;if(n===x||n===E){var r=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:r}}else a[n]=t[e]})),m.a.createElement(e,a)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!(e===x||e===E)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+V(r[t],n)+'"';return e?e+" "+a:a}),""),i=r.innerHTML||r.cssText||"",o=-1===z.indexOf(e);return t+"<"+e+' data-react-helmet="true" '+a+(o?"/>":">"+i+"")}),"")}(e,t,n)}}}},me=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,i=e.linkTags,o=e.metaTags,l=e.noscriptTags,u=e.scriptTags,s=e.styleTags,c=e.title,f=void 0===c?"":c,d=e.titleAttributes;return{base:pe(w.BASE,t,r),bodyAttributes:pe(b,n,r),htmlAttributes:pe(v,a,r),link:pe(w.LINK,i,r),meta:pe(w.META,o,r),noscript:pe(w.NOSCRIPT,l,r),script:pe(w.SCRIPT,u,r),style:pe(w.STYLE,s,r),title:pe(w.TITLE,{title:f,titleAttributes:d},r)}},ge=c()((function(e){return{baseTag:X([S,R],e),bodyAttributes:Y(b,e),defer:Z(e,j),encode:Z(e,L),htmlAttributes:Y(v,e),linkTags:J(w.LINK,[A,S],e),metaTags:J(w.META,[O,k,T,_,C],e),noscriptTags:J(w.NOSCRIPT,[x],e),onChangeClientState:Q(e),scriptTags:J(w.SCRIPT,[P,x],e),styleTags:J(w.STYLE,[E],e),title:K(e),titleAttributes:Y(y,e)}}),(function(e){ie&&re(ie),e.defer?ie=ne((function(){oe(e,(function(){ie=null}))})):(oe(e),ie=null)}),me)((function(){return null})),he=(a=ge,o=i=function(e){function t(){return $(this,t),W(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:t};case w.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,a=e.newChildProps,i=e.nestedChildren;return H({},r,((t={})[n.type]=[].concat(r[n.type]||[],[H({},a,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,i=e.newChildProps,o=e.nestedChildren;switch(r.type){case w.TITLE:return H({},a,((t={})[r.type]=o,t.titleAttributes=H({},i),t));case w.BODY:return H({},a,{bodyAttributes:H({},i)});case w.HTML:return H({},a,{htmlAttributes:H({},i)})}return H({},a,((n={})[r.type]=H({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=H({},t);return Object.keys(e).forEach((function(t){var r;n=H({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return m.a.Children.forEach(e,(function(e){if(e&&e.props){var a=e.props,i=a.children,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[M[n]||n]=e[n],t}),t)}(G(a,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:o,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:o,nestedChildren:i})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=G(e,["children"]),r=H({},n);return t&&(r=this.mapChildrenToProps(t,r)),m.a.createElement(a,r)},q(t,null,[{key:"canUseDOM",set:function(e){a.canUseDOM=e}}]),t}(m.a.Component),i.propTypes={base:u.a.object,bodyAttributes:u.a.object,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]),defaultTitle:u.a.string,defer:u.a.bool,encodeSpecialCharacters:u.a.bool,htmlAttributes:u.a.object,link:u.a.arrayOf(u.a.object),meta:u.a.arrayOf(u.a.object),noscript:u.a.arrayOf(u.a.object),onChangeClientState:u.a.func,script:u.a.arrayOf(u.a.object),style:u.a.arrayOf(u.a.object),title:u.a.string,titleAttributes:u.a.object,titleTemplate:u.a.string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=a.peek,i.rewind=function(){var e=a.rewind();return e||(e=me({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},o);he.renderStatic=he.rewind}).call(this,n(27))},function(e,t,n){"use strict";var r,a=n(0),i=(r=a)&&"object"==typeof r&&"default"in r?r.default:r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function c(){u=e(s.map((function(e){return e.props}))),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.peek=function(){return u},a.rewind=function(){if(a.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,s=[],e};var o=a.prototype;return o.UNSAFE_componentWillMount=function(){s.push(this),c()},o.componentDidUpdate=function(){c()},o.componentWillUnmount=function(){var e=s.indexOf(this);s.splice(e,1),c()},o.render=function(){return i.createElement(r,this.props)},a}(a.PureComponent);return o(f,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),o(f,"canUseDOM",l),f}}},function(e,t){var n="undefined"!=typeof Element,r="function"==typeof Map,a="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var l,u,s,c;if(Array.isArray(e)){if((l=e.length)!=t.length)return!1;for(u=l;0!=u--;)if(!o(e[u],t[u]))return!1;return!0}if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!t.has(u.value[0]))return!1;for(c=e.entries();!(u=c.next()).done;)if(!o(u.value[1],t.get(u.value[0])))return!1;return!0}if(a&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!t.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((l=e.length)!=t.length)return!1;for(u=l;0!=u--;)if(e[u]!==t[u])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((l=(s=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(u=l;0!=u--;)if(!Object.prototype.hasOwnProperty.call(t,s[u]))return!1;if(n&&e instanceof Element)return!1;for(u=l;0!=u--;)if(("_owner"!==s[u]&&"__v"!==s[u]&&"__o"!==s[u]||!e.$$typeof)&&!o(e[s[u]],t[s[u]]))return!1;return!0}return e!=e&&t!=t}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},,function(e,t,n){e.exports=n(53)},function(e,t,n){"use strict";var r=n(11),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,l=a?Symbol.for("react.fragment"):60107,u=a?Symbol.for("react.strict_mode"):60108,s=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,f=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.memo"):60115,g=a?Symbol.for("react.lazy"):60116,h="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nP.length&&P.push(e)}function I(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return n(r,e,""===t?"."+L(e,0):t),1;if(l=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u