@robylon/web-react-sdk 1.1.8 → 1.1.9-staging.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  interface ChatbotProps {
3
3
  api_key: string;
4
- user_id: string;
4
+ user_id?: string;
5
5
  user_token?: string;
6
6
  user_profile?: Record<string, any>;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  export interface ChatbotConfig {
2
2
  chatbotId: string;
3
3
  userId: string;
4
- token: string;
4
+ token?: string;
5
5
  userProfile?: Record<string, any>;
6
6
  domain: string;
7
7
  brand_colour: string;
@@ -0,0 +1 @@
1
+ export declare function generateUUID(): string;
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useRef as t,useCallback as n,useEffect as o,useState as i}from"react";var r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function a(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function s(e,t){var n,o,i,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(r=0)),r;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(6===s[0]&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}"function"==typeof SuppressedError&&SuppressedError;var c={copilotUrl:"https://chatbot.robylon.ai",environment:"production",apiUrl:"https://api.robylon.ai"},l=function(){return{copilotUrl:c.copilotUrl,environment:c.environment,apiUrl:c.apiUrl}},d=function(e){var t=e?"USER_DATA=%7B%22attributes%22%3A%5B%7B%22key%22%3A%22USER_ATTRIBUTE_USER_EMAIL%22%2C%22value%22%3A%22dinesh.goel%40robylon.ai%22%7D%2C%7B%22key%22%3A%22USER_ATTRIBUTE_UNIQUE_ID%22%2C%22value%22%3A%2266011f2c28d1787d13c6c796%22%7D%5D%2C%22subscribedToOldSdk%22%3Afalse%2C%22deviceUuid%22%3A%2226c02feb-2664-451d-8469-9cf1378547c6%22%2C%22deviceAdded%22%3Atrue%7D; _ga_3YS9P6ZDWX=GS1.1.1715252584.3.1.1715258696.39.0.0; _ga_V4J24F7YF9=GS1.1.1715273274.2.0.1715273274.0.0.0; city_name=Bengaluru; lang_code=en-in; cookieConcent=A; _gcl_au=1.1.343275043.1717154298; _clck=43guwd%7C2%7Cfmi%7C0%7C1561; _gid=GA1.2.1423066649.1718210058; moe_uuid=26c02feb-2664-451d-8469-9cf1378547c6; _ga_6RM65PWEZY=GS1.1.1718210058.18.1.1718211647.60.0.0; _ga=GA1.1.689213983.1712737672; AMP_MKTG_fe4beb374f=JTdCJTIycmVmZXJyZXIlMjIlM0ElMjJodHRwcyUzQSUyRiUyRmFjY291bnRzLnRlYWNobWludC5jb20lMkYlMjIlMkMlMjJyZWZlcnJpbmdfZG9tYWluJTIyJTNBJTIyYWNjb3VudHMudGVhY2htaW50LmNvbSUyMiU3RA==; AMP_fe4beb374f=JTdCJTIyZGV2aWNlSWQlMjIlM0ElMjI0MWMxMTljZC03YzVjLTRiYTctYTUzZS1mYTgzMjRlYjc0OWUlMjIlMkMlMjJ1c2VySWQlMjIlM0ElMjIxZjI2ODAwOC01OGYxLTQwYTItYjQ0Ni1mYmQ5N2E0NDQyYTAlMjIlMkMlMjJzZXNzaW9uSWQlMjIlM0ExNzE4MjEzMzEwOTc3JTJDJTIyb3B0T3V0JTIyJTNBZmFsc2UlMkMlMjJsYXN0RXZlbnRUaW1lJTIyJTNBMTcxODIxMzMxMDk4MSUyQyUyMmxhc3RFdmVudElkJTIyJTNBMTQlN0Q=; _ga_3YS9P6ZDWX=GS1.1.1718211637.26.1.1718213441.60.0.0; SESSION=%7B%22sessionKey%22%3A%22e4d76f52-9053-4277-99a4-f1ba667fd5f2%22%2C%22sessionStartTime%22%3A%222024-06-12T16%3A34%3A19.047Z%22%2C%22sessionMaxTime%22%3A1800%2C%22customIdentifiersToTrack%22%3A%5B%5D%2C%22sessionExpiryTime%22%3A1718215247464%2C%22numberOfSessions%22%3A17%7D":document.cookie;return t=t.split(";").map((function(e){var t=e.split("="),n=t[0],o=t.slice(1).join("=").trim();return{name:n=n.trim(),value:o?decodeURIComponent(o):""}}))},u=function(e,t){void 0===t&&(t=.5);var n=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:{r:0,g:0,b:0}}(e),o=function(e,t,n){var o=[e,t,n].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*o[0]+.7152*o[1]+.0722*o[2]}(n.r,n.g,n.b);return o>t?"#0E0E0F":"#FFFFFF"},h=function(){function e(e){this.logoContainer=null,this.iframe=null,this.bubblePromptContainer=null,this.chatBtnImage=null,this.config=e,this.validateDomain()&&this.init(),window.addEventListener("message",this.onCloseListener.bind(this),!1)}return e.prototype.onCloseListener=function(e){e.origin===this.config.domain&&"closeChatbot"===e.data&&this.closeIframe()},e.prototype.validateDomain=function(){return this.config.domain===window.location.origin},e.prototype.createChatBubblContainer=function(){var e,t=this,n=document.createElement("div");n.id="chatbase-message-bubbles",Object.assign(n.style,{position:"fixed",bottom:"80px",borderRadius:"10px",fontFamily:"sans-serif",fontSize:"16px",zIndex:"2147483644",cursor:"pointer",flexDirection:"column",gap:"50px",maxWidth:"70vw",display:"block",right:"1rem",left:"unset"});var o=document.createElement("div");o.classList.add("close-btn"),o.textContent="✕",Object.assign(o.style,{position:"absolute",top:"-7px",right:"-7px",fontWeight:"bold",display:"none",justifyContent:"center",alignItems:"center",zIndex:"2147483643",width:"22px",height:"22px",borderRadius:"50%",textAlign:"center",fontSize:"12px",cursor:"pointer",backgroundColor:"rgb(224, 224, 224)",color:"black",boxShadow:"rgba(150, 150, 150, 0.15) 0px 6px 24px 0px, rgba(150, 150, 150, 0.15) 0px 0px 0px 1px"}),((null===(e=this.config.chat_interface_config)||void 0===e?void 0:e.chat_bubble_prompts)||[]).forEach((function(e){var o=t.createMessageBubble(e);n.appendChild(o)})),n.appendChild(o),document.body.appendChild(n)},e.prototype.createMessageBubble=function(e){var t=document.createElement("div");this.bubblePromptContainer=t,Object.assign(t.style,{display:"flex",position:"relative",justifyContent:"flex-end"});var n=document.createElement("div");n.classList.add("message"),n.textContent=e,Object.assign(n.style,{backgroundColor:"white",color:"black",boxShadow:"rgba(150, 150, 150, 0.2) 0px 10px 30px 0px, rgba(150, 150, 150, 0.2) 0px 0px 0px 1px",borderRadius:"10px",padding:"8px 5px",margin:"8px",fontSize:"14px",opacity:"1",transform:"scale(1)",transition:"opacity 0.5s ease 0s, transform 0.5s ease 0s"});var o=document.createElement("button");return o.innerHTML="&times;",Object.assign(o.style,{position:"absolute",top:"1px",left:"-3px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#fff",color:"#000",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 2px 5px rgba(0,0,0,0.2)",fontSize:"14px",lineHeight:"1",padding:"0",zIndex:"100"}),o.addEventListener("click",(function(){t.remove()})),t.appendChild(o),t.appendChild(n),t},e.prototype.createFloatingButton=function(){var e=document.createElement("div");e.classList.add("message-bubble-container"),Object.assign(e.style,{position:"fixed",bottom:"1.5rem",right:"1.5rem",zIndex:"1000",width:"48px",height:"48px",display:"flex",flexDirection:"column-reverse",backgroundColor:this.config.brand_colour,color:u(this.config.brand_colour),borderRadius:"50%",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden"}),document.body.appendChild(e),this.logoContainer=e,this.loadImage(this.logoContainer),this.createChatBubblContainer(),this.logoContainer.addEventListener("click",this.toggleIframe.bind(this))},e.prototype.loadImage=function(e){var t=document.createElement("img");t.src=this.config.image_url||"".concat(this.config.domain,"/chatbubble.png"),t.alt="Chat",Object.assign(t.style,{zIndex:"1000",cursor:"pointer",borderRadius:"50%",objectFit:"cover"}),this.chatBtnImage=t,e.innerHTML="",e.appendChild(t)},e.prototype.createIframe=function(){var e=this,t=document.createElement("iframe");Object.assign(t.style,{position:"fixed",right:"32px",bottom:"86px",minWidth:"400px",width:"26%",maxWidth:"800px",top:"calc(10vh - 32px)",maxHeight:"45rem",height:"calc(100vh - 3rem - 10vh)",zIndex:"20000000",border:"none",boxShadow:"0px 0px 40px 0px rgba(14, 14, 15, 0.24)",transformOrigin:"bottom right",transition:"transform 0.3s ease-out",borderRadius:"1rem",display:"none"}),t.src="".concat(this.config.domain,"/chatbot-plugin?id=").concat(this.config.chatbotId),document.body.appendChild(t),this.iframe=t;var n=function(){window.innerWidth<560?Object.assign(t.style,{width:"100vw",minWidth:"300px",right:"0",bottom:"0",height:"100vh",flexDirection:"column",flexGrow:"1",borderRadius:"0",top:"0",maxHeight:"100%"}):Object.assign(t.style,{width:"26%",minWidth:"400px",right:"32px",bottom:"86px",height:"calc(100vh - 3rem - 10vh)",borderRadius:"1rem",top:"calc(10vh - 32px)",maxHeight:"45rem"})};n(),window.addEventListener("resize",n),t.addEventListener("load",(function(){var n,o;if(e.iframe){var i=new URL(e.iframe.src).origin||e.config.domain;null===(n=t.contentWindow)||void 0===n||n.postMessage({domain:window.location.hostname,name:"checkDomain"},i),null===(o=t.contentWindow)||void 0===o||o.postMessage({domain:window.location.hostname,action:"registerUserId",data:{userId:e.config.userId,token:e.config.token,userProfile:e.config.userProfile}},i)}})),window.addEventListener("message",(function(n){var o;if(n.origin===e.config.domain){if("captureSessionData"===n.data){var i="66b33d16-5b38-4693-8772-1a1bd7dd412d"===e.config.chatbotId,r={cookies:d(i),localStorage:JSON.stringify(localStorage),sessionStorage:JSON.stringify(sessionStorage),action:"capturedSessionData",domain_name:window.location.hostname};null===(o=t.contentWindow)||void 0===o||o.postMessage(r,e.config.domain||"*")}"expand"===n.data&&(e.adjustIframeWidth(),t.style.height="calc(100vh - 120px)",t.style.bottom="86px"),"collapse"===n.data&&Object.assign(t.style,{width:"26%",height:"calc(100vh - 32px - 10vh)",bottom:"86px",top:"calc(32px + 10vh)"})}}))},e.prototype.adjustIframeWidth=function(){if(this.iframe){var e=window.innerWidth;this.iframe.style.width=e<832?"".concat(e-64,"px"):"800px"}},e.prototype.loadSvgInline=function(e){var t=document.createElement("div");t.innerHTML='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g id="Chevron_Down">\n <path id="Vector" d="M19 9L12 16L5 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </g>\n</svg>\n';var n=t.querySelector("svg");e.innerHTML="",n&&e.appendChild(n)},e.prototype.toggleIcon=function(e,t){"block"===t.style.display?this.loadSvgInline(e):this.loadImage(e)},e.prototype.toggleIframe=function(){var e;if(this.iframe&&this.logoContainer&&this.chatBtnImage){var t=new URL(this.iframe.src).origin||this.config.domain;null===(e=this.iframe.contentWindow)||void 0===e||e.postMessage({domain:window.location.hostname,name:"none"===this.iframe.style.display?"openFrame":"closeFrame"},t),this.iframe.style.display="none"===this.iframe.style.display?"block":"none",this.toggleIcon(this.logoContainer,this.iframe),this.chatBtnImage.style.objectFit="block"===this.iframe.style.display?"none":"cover",this.bubblePromptContainer&&(this.bubblePromptContainer.style.display="none")}},e.prototype.closeIframe=function(){this.iframe&&this.logoContainer&&this.chatBtnImage&&(this.iframe.style.display="none",this.toggleIcon(this.logoContainer,this.iframe),this.chatBtnImage.style.objectFit="cover")},e.prototype.init=function(){this.createIframe(),this.createFloatingButton()},e}(),f=function(e,t,n){if(e.chatbotId&&e.userId&&e.token)try{new h(e);t(!0)}catch(e){n(e instanceof Error?e.message:"Failed to initialize SDK")}else n("Incomplete configuration for SDK initialization.")},p=function(t){var n=t.config,o=t.toggleIframe,i=t.isIframeVisible,r=l().copilotUrl;return e.createElement("div",{className:"message-bubble-container",style:{position:"fixed",bottom:"1.5rem",right:"1.5rem",zIndex:1e3,width:"48px",height:"48px",display:"flex",flexDirection:"column-reverse",backgroundColor:n.brand_colour,color:u(n.brand_colour),borderRadius:"50%",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden"},onClick:o},i?e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{id:"Chevron_Down"},e.createElement("path",{id:"Vector",d:"M19 9L12 16L5 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))):e.createElement("img",{src:n.image_url||"".concat(r,"/chatbubble.png"),alt:"Chat",style:{zIndex:1e3,cursor:"pointer",borderRadius:"50%",objectFit:"cover",width:"100%",height:"100%"}}))},m=function(i){var r=i.config,a=i.isVisible,s=i.onClose,c=t(null),d=t(!1),u=t(!1),h=n((function(){var e=c.current;e&&(window.innerWidth<560?(e.style.width="100vw",e.style.minWidth="300px",e.style.right="0",e.style.bottom="0",e.style.height="100vh",e.style.flexDirection="column",e.style.flexGrow="1",e.style.borderRadius="0",e.style.top="0",e.style.maxHeight="100%"):(e.style.width="26%",e.style.minWidth="400px",e.style.right="32px",e.style.bottom="86px",e.style.height="calc(100vh - 3rem - 10vh)",e.style.borderRadius="1rem",e.style.top="calc(10vh - 32px)",e.style.maxHeight="45rem"))}),[]);return o((function(){return window.addEventListener("resize",h),h(),function(){return window.removeEventListener("resize",h)}}),[h]),o((function(){var e=c.current;if(e&&!d.current){var t=l().copilotUrl;e.src="".concat(t,"/chatbot-plugin?id=").concat(r.chatbotId),d.current=!0;var n=function(){var n,o=new URL(e.src).origin||t;null===(n=e.contentWindow)||void 0===n||n.postMessage({domain:window.location.hostname,name:"checkDomain"},o)};return e.addEventListener("load",n),function(){return e.removeEventListener("load",n)}}}),[r.chatbotId]),o((function(){var e=c.current;if(e&&d.current){var t=l().copilotUrl;if(e.style.display=a?"block":"none",e.contentWindow&&a){var n=new URL(e.src).origin||t;e.contentWindow.postMessage({domain:window.location.hostname,name:"openFrame"},n),u.current||(e.contentWindow.postMessage({domain:window.location.hostname,action:"registerUserId",data:{userId:r.userId,token:r.token,userProfile:r.userProfile}},n),u.current=!0)}}}),[a,r.userId,r.token,r.userProfile]),o((function(){if(c.current&&d.current){var e=l().copilotUrl,t=function(t){if(t.origin===e&&"closeChatbot"===t.data)s()};return window.addEventListener("message",t),function(){return window.removeEventListener("message",t)}}}),[s]),e.createElement("iframe",{ref:c,id:"chat-iframe-rbyln",style:{position:"fixed",zIndex:2e7,border:"none",boxShadow:"0px 0px 40px 0px rgba(14, 14, 15, 0.24)",transformOrigin:"bottom right",transition:"transform 0.3s ease-out",display:a?"block":"none"}})},g=function(){var e,t,n;return(null===(n=null===(t=null===(e=navigator.userAgentData)||void 0===e?void 0:e.brands)||void 0===t?void 0:t[0])||void 0===n?void 0:n.brand)||(/Chrome|Firefox|Safari|Edge|Opera/.exec(navigator.userAgent)||["Unknown"])[0]},b=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},v=function(t){var n=t.api_key,c=t.user_id,d=t.user_token,u=t.user_profile,h=i(!1),v=h[0],y=h[1],x=i(null),w=x[0],I=x[1],_=i(!1),C=_[0],M=_[1],k=i(null),E=k[0],j=k[1];o((function(){n&&c?a(void 0,void 0,void 0,(function(){var e,t,o,i,h,p,m,v,x,w,_,C,M,k;return s(this,(function(E){switch(E.label){case 0:return E.trys.push([0,2,,3]),[4,(S=n,T=c,W=d,a(void 0,void 0,void 0,(function(){var e,t,n,o;return s(this,(function(i){switch(i.label){case 0:e=l().apiUrl,t="".concat(e,"/chat/chatbot/get/"),n={client_user_id:T,org_id:S,token:W||T,extra_info:{}},i.label=1;case 1:return i.trys.push([1,4,,5]),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})];case 2:if(!(o=i.sent()).ok)throw new Error("Failed to fetch chatbot configuration");return[4,o.json()];case 3:return[2,i.sent()];case 4:throw i.sent();case 5:return[2]}}))})))];case 1:return e=E.sent(),t=["email","name","mobile","platform","OS","browser","sdk_version","device","screen_size"],o=function(){return{platform:"web",os:(null===(t=navigator.userAgentData)||void 0===t?void 0:t.platform)||(/Windows|Mac|Linux|Android|iOS/.exec(navigator.userAgent)||["Unknown"])[0],browser:g(),sdk_version:"1.1.8-staging.2",device:(e=navigator.userAgent.toLowerCase(),/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"),screen_size:{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}};var e,t}(),i=r(r({},o),u?Object.fromEntries(Object.entries(u).filter((function(e){var n=e[0];return t.includes(n)}))):{}),h={chatbotId:n,userId:c,token:d||c,domain:"",brand_colour:(null===(x=null===(v=e.user.org_info.brand_config)||void 0===v?void 0:v.colors)||void 0===x?void 0:x.brand_color)||"",image_url:(null===(_=null===(w=e.user.org_info)||void 0===w?void 0:w.brand_config)||void 0===_?void 0:_.launcher_logo_url)||"",userProfile:i,chat_interface_config:{chat_bubble_prompts:[],display_name:(null===(C=e.user.org_info.brand_config)||void 0===C?void 0:C.display_name)||"",welcome_message:(null===(M=e.user.org_info.brand_config)||void 0===M?void 0:M.welcome_message)||"Hey! What can we help you with today?",redirect_url:(null===(k=e.user.org_info.brand_config)||void 0===k?void 0:k.redirect_url)||""}},j(h),f(h,y,I),[3,3];case 2:return p=E.sent(),m=p instanceof Error?p.message:"Failed to initialize chatbot",b("Chatbot initialization error:",m),I(m),[3,3];case 3:return[2]}var S,T,W}))})):b("Missing required configuration: api_key or user_id")}),[n,c,d,u]);return n&&c?w?(b("Chatbot error:",w),null):E&&v?e.createElement(e.Fragment,null,e.createElement(p,{config:E,toggleIframe:function(){return M(!C)},isIframeVisible:C}),e.createElement(m,{config:E,isVisible:C,onClose:function(){M(!1)}})):null:(b("Missing required configuration: api_key or user_id"),null)},y=function(e){var t=i({isLoading:!0,isInitialized:!1,error:null}),n=t[0],a=t[1],s=function(e){a((function(t){return r(r({},t),{isInitialized:e})}))},c=function(e){a((function(t){return r(r({},t),{error:e})}))};return o((function(){!function(){try{f(e,s,c)}catch(e){a((function(t){return r(r({},t),{error:e instanceof Error?e.message:"Failed to initialize SDK",isLoading:!1})}))}}()}),[e.chatbotId,e.userId]),n};export{v as Chatbot,y as useChatbot};
1
+ import n,{useRef as t,useCallback as r,useEffect as e,useState as i}from"react";var o=function(){return o=Object.assign||function(n){for(var t,r=1,e=arguments.length;r<e;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},o.apply(this,arguments)};function u(n,t,r,e){return new(r||(r=Promise))((function(i,o){function u(n){try{c(e.next(n))}catch(n){o(n)}}function a(n){try{c(e.throw(n))}catch(n){o(n)}}function c(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(u,a)}c((e=e.apply(n,t||[])).next())}))}function a(n,t){var r,e,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(o=0)),o;)try{if(r=1,e&&(i=2&a[0]?e.return:a[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,a[1])).done)return i;switch(e=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,e=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(n,o)}catch(n){a=[6,n],e=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}"function"==typeof SuppressedError&&SuppressedError;var c,f,l={copilotUrl:"https://staging.d2s3wsqyyond1h.amplifyapp.com",environment:"staging",apiUrl:"https://stage-api.robylon.ai"},s=function(){return{copilotUrl:l.copilotUrl,environment:l.environment,apiUrl:l.apiUrl}},h=function(n,t,r){return u(void 0,void 0,void 0,(function(){var e,i,o,u;return a(this,(function(a){switch(a.label){case 0:e=s().apiUrl,i="".concat(e,"/chat/chatbot/get/"),o={client_user_id:t,org_id:n,token:r||t,extra_info:{}},a.label=1;case 1:return a.trys.push([1,4,,5]),[4,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})];case 2:if(!(u=a.sent()).ok)throw new Error("Failed to fetch chatbot configuration");return[4,u.json()];case 3:return[2,a.sent()];case 4:throw a.sent();case 5:return[2]}}))}))},p=function(n){var t=n?"USER_DATA=%7B%22attributes%22%3A%5B%7B%22key%22%3A%22USER_ATTRIBUTE_USER_EMAIL%22%2C%22value%22%3A%22dinesh.goel%40robylon.ai%22%7D%2C%7B%22key%22%3A%22USER_ATTRIBUTE_UNIQUE_ID%22%2C%22value%22%3A%2266011f2c28d1787d13c6c796%22%7D%5D%2C%22subscribedToOldSdk%22%3Afalse%2C%22deviceUuid%22%3A%2226c02feb-2664-451d-8469-9cf1378547c6%22%2C%22deviceAdded%22%3Atrue%7D; _ga_3YS9P6ZDWX=GS1.1.1715252584.3.1.1715258696.39.0.0; _ga_V4J24F7YF9=GS1.1.1715273274.2.0.1715273274.0.0.0; city_name=Bengaluru; lang_code=en-in; cookieConcent=A; _gcl_au=1.1.343275043.1717154298; _clck=43guwd%7C2%7Cfmi%7C0%7C1561; _gid=GA1.2.1423066649.1718210058; moe_uuid=26c02feb-2664-451d-8469-9cf1378547c6; _ga_6RM65PWEZY=GS1.1.1718210058.18.1.1718211647.60.0.0; _ga=GA1.1.689213983.1712737672; AMP_MKTG_fe4beb374f=JTdCJTIycmVmZXJyZXIlMjIlM0ElMjJodHRwcyUzQSUyRiUyRmFjY291bnRzLnRlYWNobWludC5jb20lMkYlMjIlMkMlMjJyZWZlcnJpbmdfZG9tYWluJTIyJTNBJTIyYWNjb3VudHMudGVhY2htaW50LmNvbSUyMiU3RA==; AMP_fe4beb374f=JTdCJTIyZGV2aWNlSWQlMjIlM0ElMjI0MWMxMTljZC03YzVjLTRiYTctYTUzZS1mYTgzMjRlYjc0OWUlMjIlMkMlMjJ1c2VySWQlMjIlM0ElMjIxZjI2ODAwOC01OGYxLTQwYTItYjQ0Ni1mYmQ5N2E0NDQyYTAlMjIlMkMlMjJzZXNzaW9uSWQlMjIlM0ExNzE4MjEzMzEwOTc3JTJDJTIyb3B0T3V0JTIyJTNBZmFsc2UlMkMlMjJsYXN0RXZlbnRUaW1lJTIyJTNBMTcxODIxMzMxMDk4MSUyQyUyMmxhc3RFdmVudElkJTIyJTNBMTQlN0Q=; _ga_3YS9P6ZDWX=GS1.1.1718211637.26.1.1718213441.60.0.0; SESSION=%7B%22sessionKey%22%3A%22e4d76f52-9053-4277-99a4-f1ba667fd5f2%22%2C%22sessionStartTime%22%3A%222024-06-12T16%3A34%3A19.047Z%22%2C%22sessionMaxTime%22%3A1800%2C%22customIdentifiersToTrack%22%3A%5B%5D%2C%22sessionExpiryTime%22%3A1718215247464%2C%22numberOfSessions%22%3A17%7D":document.cookie;return t=t.split(";").map((function(n){var t=n.split("="),r=t[0],e=t.slice(1).join("=").trim();return{name:r=r.trim(),value:e?decodeURIComponent(e):""}}))},v=function(n,t){void 0===t&&(t=.5);var r=function(n){n=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(n,t,r,e){return t+t+r+r+e+e}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:{r:0,g:0,b:0}}(n),e=function(n,t,r){var e=[n,t,r].map((function(n){return(n/=255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}));return.2126*e[0]+.7152*e[1]+.0722*e[2]}(r.r,r.g,r.b);return e>t?"#0E0E0F":"#FFFFFF"},d=function(){function n(n){this.logoContainer=null,this.iframe=null,this.bubblePromptContainer=null,this.chatBtnImage=null,this.config=n,this.validateDomain()&&this.init(),window.addEventListener("message",this.onCloseListener.bind(this),!1)}return n.prototype.onCloseListener=function(n){n.origin===this.config.domain&&"closeChatbot"===n.data&&this.closeIframe()},n.prototype.validateDomain=function(){return this.config.domain===window.location.origin},n.prototype.createChatBubblContainer=function(){var n,t=this,r=document.createElement("div");r.id="chatbase-message-bubbles",Object.assign(r.style,{position:"fixed",bottom:"80px",borderRadius:"10px",fontFamily:"sans-serif",fontSize:"16px",zIndex:"2147483644",cursor:"pointer",flexDirection:"column",gap:"50px",maxWidth:"70vw",display:"block",right:"1rem",left:"unset"});var e=document.createElement("div");e.classList.add("close-btn"),e.textContent="✕",Object.assign(e.style,{position:"absolute",top:"-7px",right:"-7px",fontWeight:"bold",display:"none",justifyContent:"center",alignItems:"center",zIndex:"2147483643",width:"22px",height:"22px",borderRadius:"50%",textAlign:"center",fontSize:"12px",cursor:"pointer",backgroundColor:"rgb(224, 224, 224)",color:"black",boxShadow:"rgba(150, 150, 150, 0.15) 0px 6px 24px 0px, rgba(150, 150, 150, 0.15) 0px 0px 0px 1px"}),((null===(n=this.config.chat_interface_config)||void 0===n?void 0:n.chat_bubble_prompts)||[]).forEach((function(n){var e=t.createMessageBubble(n);r.appendChild(e)})),r.appendChild(e),document.body.appendChild(r)},n.prototype.createMessageBubble=function(n){var t=document.createElement("div");this.bubblePromptContainer=t,Object.assign(t.style,{display:"flex",position:"relative",justifyContent:"flex-end"});var r=document.createElement("div");r.classList.add("message"),r.textContent=n,Object.assign(r.style,{backgroundColor:"white",color:"black",boxShadow:"rgba(150, 150, 150, 0.2) 0px 10px 30px 0px, rgba(150, 150, 150, 0.2) 0px 0px 0px 1px",borderRadius:"10px",padding:"8px 5px",margin:"8px",fontSize:"14px",opacity:"1",transform:"scale(1)",transition:"opacity 0.5s ease 0s, transform 0.5s ease 0s"});var e=document.createElement("button");return e.innerHTML="&times;",Object.assign(e.style,{position:"absolute",top:"1px",left:"-3px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#fff",color:"#000",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 2px 5px rgba(0,0,0,0.2)",fontSize:"14px",lineHeight:"1",padding:"0",zIndex:"100"}),e.addEventListener("click",(function(){t.remove()})),t.appendChild(e),t.appendChild(r),t},n.prototype.createFloatingButton=function(){var n=document.createElement("div");n.classList.add("message-bubble-container"),Object.assign(n.style,{position:"fixed",bottom:"1.5rem",right:"1.5rem",zIndex:"1000",width:"48px",height:"48px",display:"flex",flexDirection:"column-reverse",backgroundColor:this.config.brand_colour,color:v(this.config.brand_colour),borderRadius:"50%",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden"}),document.body.appendChild(n),this.logoContainer=n,this.loadImage(this.logoContainer),this.createChatBubblContainer(),this.logoContainer.addEventListener("click",this.toggleIframe.bind(this))},n.prototype.loadImage=function(n){var t=document.createElement("img");t.src=this.config.image_url||"".concat(this.config.domain,"/chatbubble.png"),t.alt="Chat",Object.assign(t.style,{zIndex:"1000",cursor:"pointer",borderRadius:"50%",objectFit:"cover"}),this.chatBtnImage=t,n.innerHTML="",n.appendChild(t)},n.prototype.createIframe=function(){var n=this,t=document.createElement("iframe");Object.assign(t.style,{position:"fixed",right:"32px",bottom:"86px",minWidth:"400px",width:"26%",maxWidth:"800px",top:"calc(10vh - 32px)",maxHeight:"45rem",height:"calc(100vh - 3rem - 10vh)",zIndex:"20000000",border:"none",boxShadow:"0px 0px 40px 0px rgba(14, 14, 15, 0.24)",transformOrigin:"bottom right",transition:"transform 0.3s ease-out",borderRadius:"1rem",display:"none"}),t.src="".concat(this.config.domain,"/chatbot-plugin?id=").concat(this.config.chatbotId),document.body.appendChild(t),this.iframe=t;var r=function(){window.innerWidth<560?Object.assign(t.style,{width:"100vw",minWidth:"300px",right:"0",bottom:"0",height:"100vh",flexDirection:"column",flexGrow:"1",borderRadius:"0",top:"0",maxHeight:"100%"}):Object.assign(t.style,{width:"26%",minWidth:"400px",right:"32px",bottom:"86px",height:"calc(100vh - 3rem - 10vh)",borderRadius:"1rem",top:"calc(10vh - 32px)",maxHeight:"45rem"})};r(),window.addEventListener("resize",r),t.addEventListener("load",(function(){var r,e;if(n.iframe){var i=new URL(n.iframe.src).origin||n.config.domain;null===(r=t.contentWindow)||void 0===r||r.postMessage({domain:window.location.hostname,name:"checkDomain"},i),null===(e=t.contentWindow)||void 0===e||e.postMessage({domain:window.location.hostname,action:"registerUserId",data:{userId:n.config.userId,token:n.config.token,userProfile:n.config.userProfile}},i)}})),window.addEventListener("message",(function(r){var e;if(r.origin===n.config.domain){if("captureSessionData"===r.data){var i="66b33d16-5b38-4693-8772-1a1bd7dd412d"===n.config.chatbotId,o={cookies:p(i),localStorage:JSON.stringify(localStorage),sessionStorage:JSON.stringify(sessionStorage),action:"capturedSessionData",domain_name:window.location.hostname};null===(e=t.contentWindow)||void 0===e||e.postMessage(o,n.config.domain||"*")}"expand"===r.data&&(n.adjustIframeWidth(),t.style.height="calc(100vh - 120px)",t.style.bottom="86px"),"collapse"===r.data&&Object.assign(t.style,{width:"26%",height:"calc(100vh - 32px - 10vh)",bottom:"86px",top:"calc(32px + 10vh)"})}}))},n.prototype.adjustIframeWidth=function(){if(this.iframe){var n=window.innerWidth;this.iframe.style.width=n<832?"".concat(n-64,"px"):"800px"}},n.prototype.loadSvgInline=function(n){var t=document.createElement("div");t.innerHTML='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g id="Chevron_Down">\n <path id="Vector" d="M19 9L12 16L5 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </g>\n</svg>\n';var r=t.querySelector("svg");n.innerHTML="",r&&n.appendChild(r)},n.prototype.toggleIcon=function(n,t){"block"===t.style.display?this.loadSvgInline(n):this.loadImage(n)},n.prototype.toggleIframe=function(){var n;if(this.iframe&&this.logoContainer&&this.chatBtnImage){var t=new URL(this.iframe.src).origin||this.config.domain;null===(n=this.iframe.contentWindow)||void 0===n||n.postMessage({domain:window.location.hostname,name:"none"===this.iframe.style.display?"openFrame":"closeFrame"},t),this.iframe.style.display="none"===this.iframe.style.display?"block":"none",this.toggleIcon(this.logoContainer,this.iframe),this.chatBtnImage.style.objectFit="block"===this.iframe.style.display?"none":"cover",this.bubblePromptContainer&&(this.bubblePromptContainer.style.display="none")}},n.prototype.closeIframe=function(){this.iframe&&this.logoContainer&&this.chatBtnImage&&(this.iframe.style.display="none",this.toggleIcon(this.logoContainer,this.iframe),this.chatBtnImage.style.objectFit="cover")},n.prototype.init=function(){this.createIframe(),this.createFloatingButton()},n}(),g=function(n,t,r){if(n.chatbotId&&n.userId&&n.token)try{new d(n);t(!0)}catch(n){r(n instanceof Error?n.message:"Failed to initialize SDK")}else r("Incomplete configuration for SDK initialization.")},_=function(t){var r=t.config,e=t.toggleIframe,i=t.isIframeVisible,o=s().copilotUrl;return n.createElement("div",{className:"message-bubble-container",style:{position:"fixed",bottom:"1.5rem",right:"1.5rem",zIndex:1e3,width:"48px",height:"48px",display:"flex",flexDirection:"column-reverse",backgroundColor:r.brand_colour,color:v(r.brand_colour),borderRadius:"50%",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden"},onClick:e},i?n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("g",{id:"Chevron_Down"},n.createElement("path",{id:"Vector",d:"M19 9L12 16L5 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))):n.createElement("img",{src:r.image_url||"".concat(o,"/chatbubble.png"),alt:"Chat",style:{zIndex:1e3,cursor:"pointer",borderRadius:"50%",objectFit:"cover",width:"100%",height:"100%"}}))},y=function(i){var o=i.config,u=i.isVisible,a=i.onClose,c=t(null),f=t(!1),l=t(!1),h=r((function(){var n=c.current;n&&(window.innerWidth<560?(n.style.width="100vw",n.style.minWidth="300px",n.style.right="0",n.style.bottom="0",n.style.height="100vh",n.style.flexDirection="column",n.style.flexGrow="1",n.style.borderRadius="0",n.style.top="0",n.style.maxHeight="100%"):(n.style.width="26%",n.style.minWidth="400px",n.style.right="32px",n.style.bottom="86px",n.style.height="calc(100vh - 3rem - 10vh)",n.style.borderRadius="1rem",n.style.top="calc(10vh - 32px)",n.style.maxHeight="45rem"))}),[]);return e((function(){return window.addEventListener("resize",h),h(),function(){return window.removeEventListener("resize",h)}}),[h]),e((function(){var n=c.current;if(n&&!f.current){var t=s().copilotUrl;n.src="".concat(t,"/chatbot-plugin?id=").concat(o.chatbotId),f.current=!0;var r=function(){var r,e=new URL(n.src).origin||t;null===(r=n.contentWindow)||void 0===r||r.postMessage({domain:window.location.hostname,name:"checkDomain"},e)};return n.addEventListener("load",r),function(){return n.removeEventListener("load",r)}}}),[o.chatbotId]),e((function(){var n=c.current;if(n&&f.current){var t=s().copilotUrl;if(n.style.display=u?"block":"none",n.contentWindow&&u){var r=new URL(n.src).origin||t;n.contentWindow.postMessage({domain:window.location.hostname,name:"openFrame"},r),l.current||(n.contentWindow.postMessage({domain:window.location.hostname,action:"registerUserId",data:{userId:o.userId,token:o.token,userProfile:o.userProfile}},r),l.current=!0)}}}),[u,o.userId,o.token,o.userProfile]),e((function(){if(c.current&&f.current){var n=s().copilotUrl,t=function(t){if(t.origin===n&&"closeChatbot"===t.data)a()};return window.addEventListener("message",t),function(){return window.removeEventListener("message",t)}}}),[a]),n.createElement("iframe",{ref:c,id:"chat-iframe-rbyln",style:{position:"fixed",zIndex:2e7,border:"none",boxShadow:"0px 0px 40px 0px rgba(14, 14, 15, 0.24)",transformOrigin:"bottom right",transition:"transform 0.3s ease-out",display:u?"block":"none"}})},b=function(){var n,t,r;return(null===(r=null===(t=null===(n=navigator.userAgentData)||void 0===n?void 0:n.brands)||void 0===t?void 0:t[0])||void 0===r?void 0:r.brand)||(/Chrome|Firefox|Safari|Edge|Opera/.exec(navigator.userAgent)||["Unknown"])[0]},m=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t]},w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},x={exports:{}};c=x,f=x.exports,function(){var n,t="Expected a function",r="__lodash_hash_undefined__",e="__lodash_placeholder__",i=16,o=32,u=64,a=128,l=256,s=1/0,h=9007199254740991,p=NaN,v=4294967295,d=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",u],["rearg",l]],g="[object Arguments]",_="[object Array]",y="[object Boolean]",b="[object Date]",m="[object Error]",x="[object Function]",I="[object GeneratorFunction]",j="[object Map]",k="[object Number]",A="[object Object]",E="[object Promise]",C="[object RegExp]",S="[object Set]",O="[object String]",M="[object Symbol]",R="[object WeakMap]",z="[object ArrayBuffer]",T="[object DataView]",W="[object Float32Array]",L="[object Float64Array]",U="[object Int8Array]",B="[object Int16Array]",D="[object Int32Array]",F="[object Uint8Array]",N="[object Uint8ClampedArray]",P="[object Uint16Array]",J="[object Uint32Array]",$=/\b__p \+= '';/g,Z=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,G=RegExp(V.source),H=RegExp(q.source),K=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tn=/^\w*$/,rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,en=/[\\^$.*+?()[\]{}|]/g,on=RegExp(en.source),un=/^\s+/,an=/\s/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fn=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/[()=,{}\[\]\/\s]/,pn=/\\(\\)?/g,vn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,gn=/^[-+]0x[0-9a-f]+$/i,_n=/^0b[01]+$/i,yn=/^\[object .+?Constructor\]$/,bn=/^0o[0-7]+$/i,mn=/^(?:0|[1-9]\d*)$/,wn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xn=/($^)/,In=/['\n\r\u2028\u2029\\]/g,jn="\\ud800-\\udfff",kn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",An="\\u2700-\\u27bf",En="a-z\\xdf-\\xf6\\xf8-\\xff",Cn="A-Z\\xc0-\\xd6\\xd8-\\xde",Sn="\\ufe0e\\ufe0f",On="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Mn="['’]",Rn="["+jn+"]",zn="["+On+"]",Tn="["+kn+"]",Wn="\\d+",Ln="["+An+"]",Un="["+En+"]",Bn="[^"+jn+On+Wn+An+En+Cn+"]",Dn="\\ud83c[\\udffb-\\udfff]",Fn="[^"+jn+"]",Nn="(?:\\ud83c[\\udde6-\\uddff]){2}",Pn="[\\ud800-\\udbff][\\udc00-\\udfff]",Jn="["+Cn+"]",$n="\\u200d",Zn="(?:"+Un+"|"+Bn+")",Yn="(?:"+Jn+"|"+Bn+")",Vn="(?:['’](?:d|ll|m|re|s|t|ve))?",qn="(?:['’](?:D|LL|M|RE|S|T|VE))?",Gn="(?:"+Tn+"|"+Dn+")?",Hn="["+Sn+"]?",Kn=Hn+Gn+"(?:"+$n+"(?:"+[Fn,Nn,Pn].join("|")+")"+Hn+Gn+")*",Qn="(?:"+[Ln,Nn,Pn].join("|")+")"+Kn,Xn="(?:"+[Fn+Tn+"?",Tn,Nn,Pn,Rn].join("|")+")",nt=RegExp(Mn,"g"),tt=RegExp(Tn,"g"),rt=RegExp(Dn+"(?="+Dn+")|"+Xn+Kn,"g"),et=RegExp([Jn+"?"+Un+"+"+Vn+"(?="+[zn,Jn,"$"].join("|")+")",Yn+"+"+qn+"(?="+[zn,Jn+Zn,"$"].join("|")+")",Jn+"?"+Zn+"+"+Vn,Jn+"+"+qn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wn,Qn].join("|"),"g"),it=RegExp("["+$n+jn+kn+Sn+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ut=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ct={};ct[W]=ct[L]=ct[U]=ct[B]=ct[D]=ct[F]=ct[N]=ct[P]=ct[J]=!0,ct[g]=ct[_]=ct[z]=ct[y]=ct[T]=ct[b]=ct[m]=ct[x]=ct[j]=ct[k]=ct[A]=ct[C]=ct[S]=ct[O]=ct[R]=!1;var ft={};ft[g]=ft[_]=ft[z]=ft[T]=ft[y]=ft[b]=ft[W]=ft[L]=ft[U]=ft[B]=ft[D]=ft[j]=ft[k]=ft[A]=ft[C]=ft[S]=ft[O]=ft[M]=ft[F]=ft[N]=ft[P]=ft[J]=!0,ft[m]=ft[x]=ft[R]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ht=parseInt,pt="object"==typeof w&&w&&w.Object===Object&&w,vt="object"==typeof self&&self&&self.Object===Object&&self,dt=pt||vt||Function("return this")(),gt=f&&!f.nodeType&&f,_t=gt&&c&&!c.nodeType&&c,yt=_t&&_t.exports===gt,bt=yt&&pt.process,mt=function(){try{var n=_t&&_t.require&&_t.require("util").types;return n||bt&&bt.binding&&bt.binding("util")}catch(n){}}(),wt=mt&&mt.isArrayBuffer,xt=mt&&mt.isDate,It=mt&&mt.isMap,jt=mt&&mt.isRegExp,kt=mt&&mt.isSet,At=mt&&mt.isTypedArray;function Et(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function Ct(n,t,r,e){for(var i=-1,o=null==n?0:n.length;++i<o;){var u=n[i];t(e,u,r(u),n)}return e}function St(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}function Ot(n,t){for(var r=null==n?0:n.length;r--&&!1!==t(n[r],r,n););return n}function Mt(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function Rt(n,t){for(var r=-1,e=null==n?0:n.length,i=0,o=[];++r<e;){var u=n[r];t(u,r,n)&&(o[i++]=u)}return o}function zt(n,t){return!(null==n||!n.length)&&Jt(n,t,0)>-1}function Tt(n,t,r){for(var e=-1,i=null==n?0:n.length;++e<i;)if(r(t,n[e]))return!0;return!1}function Wt(n,t){for(var r=-1,e=null==n?0:n.length,i=Array(e);++r<e;)i[r]=t(n[r],r,n);return i}function Lt(n,t){for(var r=-1,e=t.length,i=n.length;++r<e;)n[i+r]=t[r];return n}function Ut(n,t,r,e){var i=-1,o=null==n?0:n.length;for(e&&o&&(r=n[++i]);++i<o;)r=t(r,n[i],i,n);return r}function Bt(n,t,r,e){var i=null==n?0:n.length;for(e&&i&&(r=n[--i]);i--;)r=t(r,n[i],i,n);return r}function Dt(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}var Ft=Vt("length");function Nt(n,t,r){var e;return r(n,(function(n,r,i){if(t(n,r,i))return e=r,!1})),e}function Pt(n,t,r,e){for(var i=n.length,o=r+(e?1:-1);e?o--:++o<i;)if(t(n[o],o,n))return o;return-1}function Jt(n,t,r){return t==t?function(n,t,r){for(var e=r-1,i=n.length;++e<i;)if(n[e]===t)return e;return-1}(n,t,r):Pt(n,Zt,r)}function $t(n,t,r,e){for(var i=r-1,o=n.length;++i<o;)if(e(n[i],t))return i;return-1}function Zt(n){return n!=n}function Yt(n,t){var r=null==n?0:n.length;return r?Ht(n,t)/r:p}function Vt(t){return function(r){return null==r?n:r[t]}}function qt(t){return function(r){return null==t?n:t[r]}}function Gt(n,t,r,e,i){return i(n,(function(n,i,o){r=e?(e=!1,n):t(r,n,i,o)})),r}function Ht(t,r){for(var e,i=-1,o=t.length;++i<o;){var u=r(t[i]);u!==n&&(e=e===n?u:e+u)}return e}function Kt(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function Qt(n){return n?n.slice(0,dr(n)+1).replace(un,""):n}function Xt(n){return function(t){return n(t)}}function nr(n,t){return Wt(t,(function(t){return n[t]}))}function tr(n,t){return n.has(t)}function rr(n,t){for(var r=-1,e=n.length;++r<e&&Jt(t,n[r],0)>-1;);return r}function er(n,t){for(var r=n.length;r--&&Jt(t,n[r],0)>-1;);return r}var ir=qt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),or=qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ur(n){return"\\"+lt[n]}function ar(n){return it.test(n)}function cr(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function fr(n,t){return function(r){return n(t(r))}}function lr(n,t){for(var r=-1,i=n.length,o=0,u=[];++r<i;){var a=n[r];a!==t&&a!==e||(n[r]=e,u[o++]=r)}return u}function sr(n){var t=-1,r=Array(n.size);return n.forEach((function(n){r[++t]=n})),r}function hr(n){var t=-1,r=Array(n.size);return n.forEach((function(n){r[++t]=[n,n]})),r}function pr(n){return ar(n)?function(n){for(var t=rt.lastIndex=0;rt.test(n);)++t;return t}(n):Ft(n)}function vr(n){return ar(n)?function(n){return n.match(rt)||[]}(n):function(n){return n.split("")}(n)}function dr(n){for(var t=n.length;t--&&an.test(n.charAt(t)););return t}var gr=qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),_r=function c(f){var w,an=(f=null==f?dt:_r.defaults(dt.Object(),f,_r.pick(dt,ut))).Array,jn=f.Date,kn=f.Error,An=f.Function,En=f.Math,Cn=f.Object,Sn=f.RegExp,On=f.String,Mn=f.TypeError,Rn=an.prototype,zn=An.prototype,Tn=Cn.prototype,Wn=f["__core-js_shared__"],Ln=zn.toString,Un=Tn.hasOwnProperty,Bn=0,Dn=(w=/[^.]+$/.exec(Wn&&Wn.keys&&Wn.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",Fn=Tn.toString,Nn=Ln.call(Cn),Pn=dt._,Jn=Sn("^"+Ln.call(Un).replace(en,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$n=yt?f.Buffer:n,Zn=f.Symbol,Yn=f.Uint8Array,Vn=$n?$n.allocUnsafe:n,qn=fr(Cn.getPrototypeOf,Cn),Gn=Cn.create,Hn=Tn.propertyIsEnumerable,Kn=Rn.splice,Qn=Zn?Zn.isConcatSpreadable:n,Xn=Zn?Zn.iterator:n,rt=Zn?Zn.toStringTag:n,it=function(){try{var n=ho(Cn,"defineProperty");return n({},"",{}),n}catch(n){}}(),lt=f.clearTimeout!==dt.clearTimeout&&f.clearTimeout,pt=jn&&jn.now!==dt.Date.now&&jn.now,vt=f.setTimeout!==dt.setTimeout&&f.setTimeout,gt=En.ceil,_t=En.floor,bt=Cn.getOwnPropertySymbols,mt=$n?$n.isBuffer:n,Ft=f.isFinite,qt=Rn.join,yr=fr(Cn.keys,Cn),br=En.max,mr=En.min,wr=jn.now,xr=f.parseInt,Ir=En.random,jr=Rn.reverse,kr=ho(f,"DataView"),Ar=ho(f,"Map"),Er=ho(f,"Promise"),Cr=ho(f,"Set"),Sr=ho(f,"WeakMap"),Or=ho(Cn,"create"),Mr=Sr&&new Sr,Rr={},zr=Do(kr),Tr=Do(Ar),Wr=Do(Er),Lr=Do(Cr),Ur=Do(Sr),Br=Zn?Zn.prototype:n,Dr=Br?Br.valueOf:n,Fr=Br?Br.toString:n;function Nr(n){if(ra(n)&&!Zu(n)&&!(n instanceof Zr)){if(n instanceof $r)return n;if(Un.call(n,"__wrapped__"))return Fo(n)}return new $r(n)}var Pr=function(){function t(){}return function(r){if(!ta(r))return{};if(Gn)return Gn(r);t.prototype=r;var e=new t;return t.prototype=n,e}}();function Jr(){}function $r(t,r){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=n}function Zr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Yr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Vr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Gr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new qr;++t<r;)this.add(n[t])}function Hr(n){var t=this.__data__=new Vr(n);this.size=t.size}function Kr(n,t){var r=Zu(n),e=!r&&$u(n),i=!r&&!e&&Gu(n),o=!r&&!e&&!i&&la(n),u=r||e||i||o,a=u?Kt(n.length,On):[],c=a.length;for(var f in n)!t&&!Un.call(n,f)||u&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||mo(f,c))||a.push(f);return a}function Qr(t){var r=t.length;return r?t[Ge(0,r-1)]:n}function Xr(n,t){return Lo(Oi(n),ce(t,0,n.length))}function ne(n){return Lo(Oi(n))}function te(t,r,e){(e!==n&&!Nu(t[r],e)||e===n&&!(r in t))&&ue(t,r,e)}function re(t,r,e){var i=t[r];Un.call(t,r)&&Nu(i,e)&&(e!==n||r in t)||ue(t,r,e)}function ee(n,t){for(var r=n.length;r--;)if(Nu(n[r][0],t))return r;return-1}function ie(n,t,r,e){return pe(n,(function(n,i,o){t(e,n,r(n),o)})),e}function oe(n,t){return n&&Mi(t,Ra(t),n)}function ue(n,t,r){"__proto__"==t&&it?it(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function ae(t,r){for(var e=-1,i=r.length,o=an(i),u=null==t;++e<i;)o[e]=u?n:Ea(t,r[e]);return o}function ce(t,r,e){return t==t&&(e!==n&&(t=t<=e?t:e),r!==n&&(t=t>=r?t:r)),t}function fe(t,r,e,i,o,u){var a,c=1&r,f=2&r,l=4&r;if(e&&(a=o?e(t,i,o,u):e(t)),a!==n)return a;if(!ta(t))return t;var s=Zu(t);if(s){if(a=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Un.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(t),!c)return Oi(t,a)}else{var h=go(t),p=h==x||h==I;if(Gu(t))return ji(t,c);if(h==A||h==g||p&&!o){if(a=f||p?{}:yo(t),!c)return f?function(n,t){return Mi(n,vo(n),t)}(t,function(n,t){return n&&Mi(t,za(t),n)}(a,t)):function(n,t){return Mi(n,po(n),t)}(t,oe(a,t))}else{if(!ft[h])return o?t:{};a=function(n,t,r){var e,i=n.constructor;switch(t){case z:return ki(n);case y:case b:return new i(+n);case T:return function(n,t){var r=t?ki(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}(n,r);case W:case L:case U:case B:case D:case F:case N:case P:case J:return Ai(n,r);case j:return new i;case k:case O:return new i(n);case C:return function(n){var t=new n.constructor(n.source,dn.exec(n));return t.lastIndex=n.lastIndex,t}(n);case S:return new i;case M:return e=n,Dr?Cn(Dr.call(e)):{}}}(t,h,c)}}u||(u=new Hr);var v=u.get(t);if(v)return v;u.set(t,a),aa(t)?t.forEach((function(n){a.add(fe(n,r,e,n,t,u))})):ea(t)&&t.forEach((function(n,i){a.set(i,fe(n,r,e,i,t,u))}));var d=s?n:(l?f?oo:io:f?za:Ra)(t);return St(d||t,(function(n,i){d&&(n=t[i=n]),re(a,i,fe(n,r,e,i,t,u))})),a}function le(t,r,e){var i=e.length;if(null==t)return!i;for(t=Cn(t);i--;){var o=e[i],u=r[o],a=t[o];if(a===n&&!(o in t)||!u(a))return!1}return!0}function se(r,e,i){if("function"!=typeof r)throw new Mn(t);return Ro((function(){r.apply(n,i)}),e)}function he(n,t,r,e){var i=-1,o=zt,u=!0,a=n.length,c=[],f=t.length;if(!a)return c;r&&(t=Wt(t,Xt(r))),e?(o=Tt,u=!1):t.length>=200&&(o=tr,u=!1,t=new Gr(t));n:for(;++i<a;){var l=n[i],s=null==r?l:r(l);if(l=e||0!==l?l:0,u&&s==s){for(var h=f;h--;)if(t[h]===s)continue n;c.push(l)}else o(t,s,e)||c.push(l)}return c}Nr.templateSettings={escape:K,evaluate:Q,interpolate:X,variable:"",imports:{_:Nr}},Nr.prototype=Jr.prototype,Nr.prototype.constructor=Nr,$r.prototype=Pr(Jr.prototype),$r.prototype.constructor=$r,Zr.prototype=Pr(Jr.prototype),Zr.prototype.constructor=Zr,Yr.prototype.clear=function(){this.__data__=Or?Or(null):{},this.size=0},Yr.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},Yr.prototype.get=function(t){var e=this.__data__;if(Or){var i=e[t];return i===r?n:i}return Un.call(e,t)?e[t]:n},Yr.prototype.has=function(t){var r=this.__data__;return Or?r[t]!==n:Un.call(r,t)},Yr.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Or&&e===n?r:e,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(n){var t=this.__data__,r=ee(t,n);return!(r<0||(r==t.length-1?t.pop():Kn.call(t,r,1),--this.size,0))},Vr.prototype.get=function(t){var r=this.__data__,e=ee(r,t);return e<0?n:r[e][1]},Vr.prototype.has=function(n){return ee(this.__data__,n)>-1},Vr.prototype.set=function(n,t){var r=this.__data__,e=ee(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Yr,map:new(Ar||Vr),string:new Yr}},qr.prototype.delete=function(n){var t=lo(this,n).delete(n);return this.size-=t?1:0,t},qr.prototype.get=function(n){return lo(this,n).get(n)},qr.prototype.has=function(n){return lo(this,n).has(n)},qr.prototype.set=function(n,t){var r=lo(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Gr.prototype.add=Gr.prototype.push=function(n){return this.__data__.set(n,r),this},Gr.prototype.has=function(n){return this.__data__.has(n)},Hr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Hr.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},Hr.prototype.get=function(n){return this.__data__.get(n)},Hr.prototype.has=function(n){return this.__data__.has(n)},Hr.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Vr){var e=r.__data__;if(!Ar||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new qr(e)}return r.set(n,t),this.size=r.size,this};var pe=Ti(we),ve=Ti(xe,!0);function de(n,t){var r=!0;return pe(n,(function(n,e,i){return r=!!t(n,e,i)})),r}function ge(t,r,e){for(var i=-1,o=t.length;++i<o;){var u=t[i],a=r(u);if(null!=a&&(c===n?a==a&&!fa(a):e(a,c)))var c=a,f=u}return f}function _e(n,t){var r=[];return pe(n,(function(n,e,i){t(n,e,i)&&r.push(n)})),r}function ye(n,t,r,e,i){var o=-1,u=n.length;for(r||(r=bo),i||(i=[]);++o<u;){var a=n[o];t>0&&r(a)?t>1?ye(a,t-1,r,e,i):Lt(i,a):e||(i[i.length]=a)}return i}var be=Wi(),me=Wi(!0);function we(n,t){return n&&be(n,t,Ra)}function xe(n,t){return n&&me(n,t,Ra)}function Ie(n,t){return Rt(t,(function(t){return Qu(n[t])}))}function je(t,r){for(var e=0,i=(r=mi(r,t)).length;null!=t&&e<i;)t=t[Bo(r[e++])];return e&&e==i?t:n}function ke(n,t,r){var e=t(n);return Zu(n)?e:Lt(e,r(n))}function Ae(t){return null==t?t===n?"[object Undefined]":"[object Null]":rt&&rt in Cn(t)?function(t){var r=Un.call(t,rt),e=t[rt];try{t[rt]=n;var i=!0}catch(n){}var o=Fn.call(t);return i&&(r?t[rt]=e:delete t[rt]),o}(t):function(n){return Fn.call(n)}(t)}function Ee(n,t){return n>t}function Ce(n,t){return null!=n&&Un.call(n,t)}function Se(n,t){return null!=n&&t in Cn(n)}function Oe(t,r,e){for(var i=e?Tt:zt,o=t[0].length,u=t.length,a=u,c=an(u),f=1/0,l=[];a--;){var s=t[a];a&&r&&(s=Wt(s,Xt(r))),f=mr(s.length,f),c[a]=!e&&(r||o>=120&&s.length>=120)?new Gr(a&&s):n}s=t[0];var h=-1,p=c[0];n:for(;++h<o&&l.length<f;){var v=s[h],d=r?r(v):v;if(v=e||0!==v?v:0,!(p?tr(p,d):i(l,d,e))){for(a=u;--a;){var g=c[a];if(!(g?tr(g,d):i(t[a],d,e)))continue n}p&&p.push(d),l.push(v)}}return l}function Me(t,r,e){var i=null==(t=So(t,r=mi(r,t)))?t:t[Bo(Ko(r))];return null==i?n:Et(i,t,e)}function Re(n){return ra(n)&&Ae(n)==g}function ze(t,r,e,i,o){return t===r||(null==t||null==r||!ra(t)&&!ra(r)?t!=t&&r!=r:function(t,r,e,i,o,u){var a=Zu(t),c=Zu(r),f=a?_:go(t),l=c?_:go(r),s=(f=f==g?A:f)==A,h=(l=l==g?A:l)==A,p=f==l;if(p&&Gu(t)){if(!Gu(r))return!1;a=!0,s=!1}if(p&&!s)return u||(u=new Hr),a||la(t)?ro(t,r,e,i,o,u):function(n,t,r,e,i,o,u){switch(r){case T:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case z:return!(n.byteLength!=t.byteLength||!o(new Yn(n),new Yn(t)));case y:case b:case k:return Nu(+n,+t);case m:return n.name==t.name&&n.message==t.message;case C:case O:return n==t+"";case j:var a=cr;case S:var c=1&e;if(a||(a=sr),n.size!=t.size&&!c)return!1;var f=u.get(n);if(f)return f==t;e|=2,u.set(n,t);var l=ro(a(n),a(t),e,i,o,u);return u.delete(n),l;case M:if(Dr)return Dr.call(n)==Dr.call(t)}return!1}(t,r,f,e,i,o,u);if(!(1&e)){var v=s&&Un.call(t,"__wrapped__"),d=h&&Un.call(r,"__wrapped__");if(v||d){var w=v?t.value():t,x=d?r.value():r;return u||(u=new Hr),o(w,x,e,i,u)}}return!!p&&(u||(u=new Hr),function(t,r,e,i,o,u){var a=1&e,c=io(t),f=c.length,l=io(r),s=l.length;if(f!=s&&!a)return!1;for(var h=f;h--;){var p=c[h];if(!(a?p in r:Un.call(r,p)))return!1}var v=u.get(t),d=u.get(r);if(v&&d)return v==r&&d==t;var g=!0;u.set(t,r),u.set(r,t);for(var _=a;++h<f;){var y=t[p=c[h]],b=r[p];if(i)var m=a?i(b,y,p,r,t,u):i(y,b,p,t,r,u);if(!(m===n?y===b||o(y,b,e,i,u):m)){g=!1;break}_||(_="constructor"==p)}if(g&&!_){var w=t.constructor,x=r.constructor;w==x||!("constructor"in t)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return u.delete(t),u.delete(r),g}(t,r,e,i,o,u))}(t,r,e,i,ze,o))}function Te(t,r,e,i){var o=e.length,u=o,a=!i;if(null==t)return!u;for(t=Cn(t);o--;){var c=e[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var f=(c=e[o])[0],l=t[f],s=c[1];if(a&&c[2]){if(l===n&&!(f in t))return!1}else{var h=new Hr;if(i)var p=i(l,s,f,t,r,h);if(!(p===n?ze(s,l,3,i,h):p))return!1}}return!0}function We(n){return!(!ta(n)||(t=n,Dn&&Dn in t))&&(Qu(n)?Jn:yn).test(Do(n));var t}function Le(n){return"function"==typeof n?n:null==n?ic:"object"==typeof n?Zu(n)?Pe(n[0],n[1]):Ne(n):pc(n)}function Ue(n){if(!ko(n))return yr(n);var t=[];for(var r in Cn(n))Un.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Be(n){if(!ta(n))return function(n){var t=[];if(null!=n)for(var r in Cn(n))t.push(r);return t}(n);var t=ko(n),r=[];for(var e in n)("constructor"!=e||!t&&Un.call(n,e))&&r.push(e);return r}function De(n,t){return n<t}function Fe(n,t){var r=-1,e=Vu(n)?an(n.length):[];return pe(n,(function(n,i,o){e[++r]=t(n,i,o)})),e}function Ne(n){var t=so(n);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===n||Te(r,n,t)}}function Pe(t,r){return xo(t)&&Ao(r)?Eo(Bo(t),r):function(e){var i=Ea(e,t);return i===n&&i===r?Ca(e,t):ze(r,i,3)}}function Je(t,r,e,i,o){t!==r&&be(r,(function(u,a){if(o||(o=new Hr),ta(u))!function(t,r,e,i,o,u,a){var c=Oo(t,e),f=Oo(r,e),l=a.get(f);if(l)te(t,e,l);else{var s=u?u(c,f,e+"",t,r,a):n,h=s===n;if(h){var p=Zu(f),v=!p&&Gu(f),d=!p&&!v&&la(f);s=f,p||v||d?Zu(c)?s=c:qu(c)?s=Oi(c):v?(h=!1,s=ji(f,!0)):d?(h=!1,s=Ai(f,!0)):s=[]:oa(f)||$u(f)?(s=c,$u(c)?s=ya(c):ta(c)&&!Qu(c)||(s=yo(f))):h=!1}h&&(a.set(f,s),o(s,f,i,u,a),a.delete(f)),te(t,e,s)}}(t,r,a,e,Je,i,o);else{var c=i?i(Oo(t,a),u,a+"",t,r,o):n;c===n&&(c=u),te(t,a,c)}}),za)}function $e(t,r){var e=t.length;if(e)return mo(r+=r<0?e:0,e)?t[r]:n}function Ze(n,t,r){t=t.length?Wt(t,(function(n){return Zu(n)?function(t){return je(t,1===n.length?n[0]:n)}:n})):[ic];var e=-1;t=Wt(t,Xt(fo()));var i=Fe(n,(function(n,r,i){var o=Wt(t,(function(t){return t(n)}));return{criteria:o,index:++e,value:n}}));return function(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}(i,(function(n,t){return function(n,t,r){for(var e=-1,i=n.criteria,o=t.criteria,u=i.length,a=r.length;++e<u;){var c=Ei(i[e],o[e]);if(c)return e>=a?c:c*("desc"==r[e]?-1:1)}return n.index-t.index}(n,t,r)}))}function Ye(n,t,r){for(var e=-1,i=t.length,o={};++e<i;){var u=t[e],a=je(n,u);r(a,u)&&ni(o,mi(u,n),a)}return o}function Ve(n,t,r,e){var i=e?$t:Jt,o=-1,u=t.length,a=n;for(n===t&&(t=Oi(t)),r&&(a=Wt(n,Xt(r)));++o<u;)for(var c=0,f=t[o],l=r?r(f):f;(c=i(a,l,c,e))>-1;)a!==n&&Kn.call(a,c,1),Kn.call(n,c,1);return n}function qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){var i=t[r];if(r==e||i!==o){var o=i;mo(i)?Kn.call(n,i,1):hi(n,i)}}return n}function Ge(n,t){return n+_t(Ir()*(t-n+1))}function He(n,t){var r="";if(!n||t<1||t>h)return r;do{t%2&&(r+=n),(t=_t(t/2))&&(n+=n)}while(t);return r}function Ke(n,t){return zo(Co(n,t,ic),n+"")}function Qe(n){return Qr(Na(n))}function Xe(n,t){var r=Na(n);return Lo(r,ce(t,0,r.length))}function ni(t,r,e,i){if(!ta(t))return t;for(var o=-1,u=(r=mi(r,t)).length,a=u-1,c=t;null!=c&&++o<u;){var f=Bo(r[o]),l=e;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(o!=a){var s=c[f];(l=i?i(s,f,c):n)===n&&(l=ta(s)?s:mo(r[o+1])?[]:{})}re(c,f,l),c=c[f]}return t}var ti=Mr?function(n,t){return Mr.set(n,t),n}:ic,ri=it?function(n,t){return it(n,"toString",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:ic;function ei(n){return Lo(Na(n))}function ii(n,t,r){var e=-1,i=n.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=an(i);++e<i;)o[e]=n[e+t];return o}function oi(n,t){var r;return pe(n,(function(n,e,i){return!(r=t(n,e,i))})),!!r}function ui(n,t,r){var e=0,i=null==n?e:n.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;e<i;){var o=e+i>>>1,u=n[o];null!==u&&!fa(u)&&(r?u<=t:u<t)?e=o+1:i=o}return i}return ai(n,t,ic,r)}function ai(t,r,e,i){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(r=e(r))!=r,c=null===r,f=fa(r),l=r===n;o<u;){var s=_t((o+u)/2),h=e(t[s]),p=h!==n,v=null===h,d=h==h,g=fa(h);if(a)var _=i||d;else _=l?d&&(i||p):c?d&&p&&(i||!v):f?d&&p&&!v&&(i||!g):!v&&!g&&(i?h<=r:h<r);_?o=s+1:u=s}return mr(u,4294967294)}function ci(n,t){for(var r=-1,e=n.length,i=0,o=[];++r<e;){var u=n[r],a=t?t(u):u;if(!r||!Nu(a,c)){var c=a;o[i++]=0===u?0:u}}return o}function fi(n){return"number"==typeof n?n:fa(n)?p:+n}function li(n){if("string"==typeof n)return n;if(Zu(n))return Wt(n,li)+"";if(fa(n))return Fr?Fr.call(n):"";var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}function si(n,t,r){var e=-1,i=zt,o=n.length,u=!0,a=[],c=a;if(r)u=!1,i=Tt;else if(o>=200){var f=t?null:Hi(n);if(f)return sr(f);u=!1,i=tr,c=new Gr}else c=t?[]:a;n:for(;++e<o;){var l=n[e],s=t?t(l):l;if(l=r||0!==l?l:0,u&&s==s){for(var h=c.length;h--;)if(c[h]===s)continue n;t&&c.push(s),a.push(l)}else i(c,s,r)||(c!==a&&c.push(s),a.push(l))}return a}function hi(n,t){return null==(n=So(n,t=mi(t,n)))||delete n[Bo(Ko(t))]}function pi(n,t,r,e){return ni(n,t,r(je(n,t)),e)}function vi(n,t,r,e){for(var i=n.length,o=e?i:-1;(e?o--:++o<i)&&t(n[o],o,n););return r?ii(n,e?0:o,e?o+1:i):ii(n,e?o+1:0,e?i:o)}function di(n,t){var r=n;return r instanceof Zr&&(r=r.value()),Ut(t,(function(n,t){return t.func.apply(t.thisArg,Lt([n],t.args))}),r)}function gi(n,t,r){var e=n.length;if(e<2)return e?si(n[0]):[];for(var i=-1,o=an(e);++i<e;)for(var u=n[i],a=-1;++a<e;)a!=i&&(o[i]=he(o[i]||u,n[a],t,r));return si(ye(o,1),t,r)}function _i(t,r,e){for(var i=-1,o=t.length,u=r.length,a={};++i<o;){var c=i<u?r[i]:n;e(a,t[i],c)}return a}function yi(n){return qu(n)?n:[]}function bi(n){return"function"==typeof n?n:ic}function mi(n,t){return Zu(n)?n:xo(n,t)?[n]:Uo(ba(n))}var wi=Ke;function xi(t,r,e){var i=t.length;return e=e===n?i:e,!r&&e>=i?t:ii(t,r,e)}var Ii=lt||function(n){return dt.clearTimeout(n)};function ji(n,t){if(t)return n.slice();var r=n.length,e=Vn?Vn(r):new n.constructor(r);return n.copy(e),e}function ki(n){var t=new n.constructor(n.byteLength);return new Yn(t).set(new Yn(n)),t}function Ai(n,t){var r=t?ki(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Ei(t,r){if(t!==r){var e=t!==n,i=null===t,o=t==t,u=fa(t),a=r!==n,c=null===r,f=r==r,l=fa(r);if(!c&&!l&&!u&&t>r||u&&a&&f&&!c&&!l||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!l&&t<r||l&&e&&o&&!i&&!u||c&&e&&o||!a&&o||!f)return-1}return 0}function Ci(n,t,r,e){for(var i=-1,o=n.length,u=r.length,a=-1,c=t.length,f=br(o-u,0),l=an(c+f),s=!e;++a<c;)l[a]=t[a];for(;++i<u;)(s||i<o)&&(l[r[i]]=n[i]);for(;f--;)l[a++]=n[i++];return l}function Si(n,t,r,e){for(var i=-1,o=n.length,u=-1,a=r.length,c=-1,f=t.length,l=br(o-a,0),s=an(l+f),h=!e;++i<l;)s[i]=n[i];for(var p=i;++c<f;)s[p+c]=t[c];for(;++u<a;)(h||i<o)&&(s[p+r[u]]=n[i++]);return s}function Oi(n,t){var r=-1,e=n.length;for(t||(t=an(e));++r<e;)t[r]=n[r];return t}function Mi(t,r,e,i){var o=!e;e||(e={});for(var u=-1,a=r.length;++u<a;){var c=r[u],f=i?i(e[c],t[c],c,e,t):n;f===n&&(f=t[c]),o?ue(e,c,f):re(e,c,f)}return e}function Ri(n,t){return function(r,e){var i=Zu(r)?Ct:ie,o=t?t():{};return i(r,n,fo(e,2),o)}}function zi(t){return Ke((function(r,e){var i=-1,o=e.length,u=o>1?e[o-1]:n,a=o>2?e[2]:n;for(u=t.length>3&&"function"==typeof u?(o--,u):n,a&&wo(e[0],e[1],a)&&(u=o<3?n:u,o=1),r=Cn(r);++i<o;){var c=e[i];c&&t(r,c,i,u)}return r}))}function Ti(n,t){return function(r,e){if(null==r)return r;if(!Vu(r))return n(r,e);for(var i=r.length,o=t?i:-1,u=Cn(r);(t?o--:++o<i)&&!1!==e(u[o],o,u););return r}}function Wi(n){return function(t,r,e){for(var i=-1,o=Cn(t),u=e(t),a=u.length;a--;){var c=u[n?a:++i];if(!1===r(o[c],c,o))break}return t}}function Li(t){return function(r){var e=ar(r=ba(r))?vr(r):n,i=e?e[0]:r.charAt(0),o=e?xi(e,1).join(""):r.slice(1);return i[t]()+o}}function Ui(n){return function(t){return Ut(Qa($a(t).replace(nt,"")),n,"")}}function Bi(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Pr(n.prototype),e=n.apply(r,t);return ta(e)?e:r}}function Di(t){return function(r,e,i){var o=Cn(r);if(!Vu(r)){var u=fo(e,3);r=Ra(r),e=function(n){return u(o[n],n,o)}}var a=t(r,e,i);return a>-1?o[u?r[a]:a]:n}}function Fi(r){return eo((function(e){var i=e.length,o=i,u=$r.prototype.thru;for(r&&e.reverse();o--;){var a=e[o];if("function"!=typeof a)throw new Mn(t);if(u&&!c&&"wrapper"==ao(a))var c=new $r([],!0)}for(o=c?o:i;++o<i;){var f=ao(a=e[o]),l="wrapper"==f?uo(a):n;c=l&&Io(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[ao(l[0])].apply(c,l[3]):1==a.length&&Io(a)?c[f]():c.thru(a)}return function(){var n=arguments,t=n[0];if(c&&1==n.length&&Zu(t))return c.plant(t).value();for(var r=0,o=i?e[r].apply(this,n):t;++r<i;)o=e[r].call(this,o);return o}}))}function Ni(t,r,e,i,o,u,c,f,l,s){var h=r&a,p=1&r,v=2&r,d=24&r,g=512&r,_=v?n:Bi(t);return function a(){for(var y=arguments.length,b=an(y),m=y;m--;)b[m]=arguments[m];if(d)var w=co(a),x=function(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}(b,w);if(i&&(b=Ci(b,i,o,d)),u&&(b=Si(b,u,c,d)),y-=x,d&&y<s){var I=lr(b,w);return qi(t,r,Ni,a.placeholder,e,b,I,f,l,s-y)}var j=p?e:this,k=v?j[t]:t;return y=b.length,f?b=function(t,r){for(var e=t.length,i=mr(r.length,e),o=Oi(t);i--;){var u=r[i];t[i]=mo(u,e)?o[u]:n}return t}(b,f):g&&y>1&&b.reverse(),h&&l<y&&(b.length=l),this&&this!==dt&&this instanceof a&&(k=_||Bi(k)),k.apply(j,b)}}function Pi(n,t){return function(r,e){return function(n,t,r,e){return we(n,(function(n,i,o){t(e,r(n),i,o)})),e}(r,n,t(e),{})}}function Ji(t,r){return function(e,i){var o;if(e===n&&i===n)return r;if(e!==n&&(o=e),i!==n){if(o===n)return i;"string"==typeof e||"string"==typeof i?(e=li(e),i=li(i)):(e=fi(e),i=fi(i)),o=t(e,i)}return o}}function $i(n){return eo((function(t){return t=Wt(t,Xt(fo())),Ke((function(r){var e=this;return n(t,(function(n){return Et(n,e,r)}))}))}))}function Zi(t,r){var e=(r=r===n?" ":li(r)).length;if(e<2)return e?He(r,t):r;var i=He(r,gt(t/pr(r)));return ar(r)?xi(vr(i),0,t).join(""):i.slice(0,t)}function Yi(t){return function(r,e,i){return i&&"number"!=typeof i&&wo(r,e,i)&&(e=i=n),r=va(r),e===n?(e=r,r=0):e=va(e),function(n,t,r,e){for(var i=-1,o=br(gt((t-n)/(r||1)),0),u=an(o);o--;)u[e?o:++i]=n,n+=r;return u}(r,e,i=i===n?r<e?1:-1:va(i),t)}}function Vi(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=_a(t),r=_a(r)),n(t,r)}}function qi(t,r,e,i,a,c,f,l,s,h){var p=8&r;r|=p?o:u,4&(r&=~(p?u:o))||(r&=-4);var v=[t,r,a,p?c:n,p?f:n,p?n:c,p?n:f,l,s,h],d=e.apply(n,v);return Io(t)&&Mo(d,v),d.placeholder=i,To(d,t,r)}function Gi(n){var t=En[n];return function(n,r){if(n=_a(n),(r=null==r?0:mr(da(r),292))&&Ft(n)){var e=(ba(n)+"e").split("e");return+((e=(ba(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return t(n)}}var Hi=Cr&&1/sr(new Cr([,-0]))[1]==s?function(n){return new Cr(n)}:fc;function Ki(n){return function(t){var r=go(t);return r==j?cr(t):r==S?hr(t):function(n,t){return Wt(t,(function(t){return[t,n[t]]}))}(t,n(t))}}function Qi(r,c,f,s,h,p,v,d){var g=2&c;if(!g&&"function"!=typeof r)throw new Mn(t);var _=s?s.length:0;if(_||(c&=-97,s=h=n),v=v===n?v:br(da(v),0),d=d===n?d:da(d),_-=h?h.length:0,c&u){var y=s,b=h;s=h=n}var m=g?n:uo(r),w=[r,c,f,s,h,y,b,p,v,d];if(m&&function(n,t){var r=n[1],i=t[1],o=r|i,u=o<131,c=i==a&&8==r||i==a&&r==l&&n[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;if(!u&&!c)return n;1&i&&(n[2]=t[2],o|=1&r?0:4);var f=t[3];if(f){var s=n[3];n[3]=s?Ci(s,f,t[4]):f,n[4]=s?lr(n[3],e):t[4]}(f=t[5])&&(s=n[5],n[5]=s?Si(s,f,t[6]):f,n[6]=s?lr(n[5],e):t[6]),(f=t[7])&&(n[7]=f),i&a&&(n[8]=null==n[8]?t[8]:mr(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=o}(w,m),r=w[0],c=w[1],f=w[2],s=w[3],h=w[4],!(d=w[9]=w[9]===n?g?0:r.length:br(w[9]-_,0))&&24&c&&(c&=-25),c&&1!=c)x=8==c||c==i?function(t,r,e){var i=Bi(t);return function o(){for(var u=arguments.length,a=an(u),c=u,f=co(o);c--;)a[c]=arguments[c];var l=u<3&&a[0]!==f&&a[u-1]!==f?[]:lr(a,f);return(u-=l.length)<e?qi(t,r,Ni,o.placeholder,n,a,l,n,n,e-u):Et(this&&this!==dt&&this instanceof o?i:t,this,a)}}(r,c,d):c!=o&&33!=c||h.length?Ni.apply(n,w):function(n,t,r,e){var i=1&t,o=Bi(n);return function t(){for(var u=-1,a=arguments.length,c=-1,f=e.length,l=an(f+a),s=this&&this!==dt&&this instanceof t?o:n;++c<f;)l[c]=e[c];for(;a--;)l[c++]=arguments[++u];return Et(s,i?r:this,l)}}(r,c,f,s);else var x=function(n,t,r){var e=1&t,i=Bi(n);return function t(){return(this&&this!==dt&&this instanceof t?i:n).apply(e?r:this,arguments)}}(r,c,f);return To((m?ti:Mo)(x,w),r,c)}function Xi(t,r,e,i){return t===n||Nu(t,Tn[e])&&!Un.call(i,e)?r:t}function no(t,r,e,i,o,u){return ta(t)&&ta(r)&&(u.set(r,t),Je(t,r,n,no,u),u.delete(r)),t}function to(t){return oa(t)?n:t}function ro(t,r,e,i,o,u){var a=1&e,c=t.length,f=r.length;if(c!=f&&!(a&&f>c))return!1;var l=u.get(t),s=u.get(r);if(l&&s)return l==r&&s==t;var h=-1,p=!0,v=2&e?new Gr:n;for(u.set(t,r),u.set(r,t);++h<c;){var d=t[h],g=r[h];if(i)var _=a?i(g,d,h,r,t,u):i(d,g,h,t,r,u);if(_!==n){if(_)continue;p=!1;break}if(v){if(!Dt(r,(function(n,t){if(!tr(v,t)&&(d===n||o(d,n,e,i,u)))return v.push(t)}))){p=!1;break}}else if(d!==g&&!o(d,g,e,i,u)){p=!1;break}}return u.delete(t),u.delete(r),p}function eo(t){return zo(Co(t,n,Yo),t+"")}function io(n){return ke(n,Ra,po)}function oo(n){return ke(n,za,vo)}var uo=Mr?function(n){return Mr.get(n)}:fc;function ao(n){for(var t=n.name+"",r=Rr[t],e=Un.call(Rr,t)?r.length:0;e--;){var i=r[e],o=i.func;if(null==o||o==n)return i.name}return t}function co(n){return(Un.call(Nr,"placeholder")?Nr:n).placeholder}function fo(){var n=Nr.iteratee||oc;return n=n===oc?Le:n,arguments.length?n(arguments[0],arguments[1]):n}function lo(n,t){var r,e,i=n.__data__;return("string"==(e=typeof(r=t))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function so(n){for(var t=Ra(n),r=t.length;r--;){var e=t[r],i=n[e];t[r]=[e,i,Ao(i)]}return t}function ho(t,r){var e=function(t,r){return null==t?n:t[r]}(t,r);return We(e)?e:n}var po=bt?function(n){return null==n?[]:(n=Cn(n),Rt(bt(n),(function(t){return Hn.call(n,t)})))}:gc,vo=bt?function(n){for(var t=[];n;)Lt(t,po(n)),n=qn(n);return t}:gc,go=Ae;function _o(n,t,r){for(var e=-1,i=(t=mi(t,n)).length,o=!1;++e<i;){var u=Bo(t[e]);if(!(o=null!=n&&r(n,u)))break;n=n[u]}return o||++e!=i?o:!!(i=null==n?0:n.length)&&na(i)&&mo(u,i)&&(Zu(n)||$u(n))}function yo(n){return"function"!=typeof n.constructor||ko(n)?{}:Pr(qn(n))}function bo(n){return Zu(n)||$u(n)||!!(Qn&&n&&n[Qn])}function mo(n,t){var r=typeof n;return!!(t=null==t?h:t)&&("number"==r||"symbol"!=r&&mn.test(n))&&n>-1&&n%1==0&&n<t}function wo(n,t,r){if(!ta(r))return!1;var e=typeof t;return!!("number"==e?Vu(r)&&mo(t,r.length):"string"==e&&t in r)&&Nu(r[t],n)}function xo(n,t){if(Zu(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!fa(n))||tn.test(n)||!nn.test(n)||null!=t&&n in Cn(t)}function Io(n){var t=ao(n),r=Nr[t];if("function"!=typeof r||!(t in Zr.prototype))return!1;if(n===r)return!0;var e=uo(r);return!!e&&n===e[0]}(kr&&go(new kr(new ArrayBuffer(1)))!=T||Ar&&go(new Ar)!=j||Er&&go(Er.resolve())!=E||Cr&&go(new Cr)!=S||Sr&&go(new Sr)!=R)&&(go=function(t){var r=Ae(t),e=r==A?t.constructor:n,i=e?Do(e):"";if(i)switch(i){case zr:return T;case Tr:return j;case Wr:return E;case Lr:return S;case Ur:return R}return r});var jo=Wn?Qu:_c;function ko(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||Tn)}function Ao(n){return n==n&&!ta(n)}function Eo(t,r){return function(e){return null!=e&&e[t]===r&&(r!==n||t in Cn(e))}}function Co(t,r,e){return r=br(r===n?t.length-1:r,0),function(){for(var n=arguments,i=-1,o=br(n.length-r,0),u=an(o);++i<o;)u[i]=n[r+i];i=-1;for(var a=an(r+1);++i<r;)a[i]=n[i];return a[r]=e(u),Et(t,this,a)}}function So(n,t){return t.length<2?n:je(n,ii(t,0,-1))}function Oo(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}var Mo=Wo(ti),Ro=vt||function(n,t){return dt.setTimeout(n,t)},zo=Wo(ri);function To(n,t,r){var e=t+"";return zo(n,function(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(cn,"{\n/* [wrapped with "+t+"] */\n")}(e,function(n,t){return St(d,(function(r){var e="_."+r[0];t&r[1]&&!zt(n,e)&&n.push(e)})),n.sort()}(function(n){var t=n.match(fn);return t?t[1].split(ln):[]}(e),r)))}function Wo(t){var r=0,e=0;return function(){var i=wr(),o=16-(i-e);if(e=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(n,arguments)}}function Lo(t,r){var e=-1,i=t.length,o=i-1;for(r=r===n?i:r;++e<r;){var u=Ge(e,o),a=t[u];t[u]=t[e],t[e]=a}return t.length=r,t}var Uo=function(n){var t=Wu(n,(function(n){return 500===r.size&&r.clear(),n})),r=t.cache;return t}((function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(rn,(function(n,r,e,i){t.push(e?i.replace(pn,"$1"):r||n)})),t}));function Bo(n){if("string"==typeof n||fa(n))return n;var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}function Do(n){if(null!=n){try{return Ln.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function Fo(n){if(n instanceof Zr)return n.clone();var t=new $r(n.__wrapped__,n.__chain__);return t.__actions__=Oi(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}var No=Ke((function(n,t){return qu(n)?he(n,ye(t,1,qu,!0)):[]})),Po=Ke((function(t,r){var e=Ko(r);return qu(e)&&(e=n),qu(t)?he(t,ye(r,1,qu,!0),fo(e,2)):[]})),Jo=Ke((function(t,r){var e=Ko(r);return qu(e)&&(e=n),qu(t)?he(t,ye(r,1,qu,!0),n,e):[]}));function $o(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=null==r?0:da(r);return i<0&&(i=br(e+i,0)),Pt(n,fo(t,3),i)}function Zo(t,r,e){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return e!==n&&(o=da(e),o=e<0?br(i+o,0):mr(o,i-1)),Pt(t,fo(r,3),o,!0)}function Yo(n){return null!=n&&n.length?ye(n,1):[]}function Vo(t){return t&&t.length?t[0]:n}var qo=Ke((function(n){var t=Wt(n,yi);return t.length&&t[0]===n[0]?Oe(t):[]})),Go=Ke((function(t){var r=Ko(t),e=Wt(t,yi);return r===Ko(e)?r=n:e.pop(),e.length&&e[0]===t[0]?Oe(e,fo(r,2)):[]})),Ho=Ke((function(t){var r=Ko(t),e=Wt(t,yi);return(r="function"==typeof r?r:n)&&e.pop(),e.length&&e[0]===t[0]?Oe(e,n,r):[]}));function Ko(t){var r=null==t?0:t.length;return r?t[r-1]:n}var Qo=Ke(Xo);function Xo(n,t){return n&&n.length&&t&&t.length?Ve(n,t):n}var nu=eo((function(n,t){var r=null==n?0:n.length,e=ae(n,t);return qe(n,Wt(t,(function(n){return mo(n,r)?+n:n})).sort(Ei)),e}));function tu(n){return null==n?n:jr.call(n)}var ru=Ke((function(n){return si(ye(n,1,qu,!0))})),eu=Ke((function(t){var r=Ko(t);return qu(r)&&(r=n),si(ye(t,1,qu,!0),fo(r,2))})),iu=Ke((function(t){var r=Ko(t);return r="function"==typeof r?r:n,si(ye(t,1,qu,!0),n,r)}));function ou(n){if(!n||!n.length)return[];var t=0;return n=Rt(n,(function(n){if(qu(n))return t=br(n.length,t),!0})),Kt(t,(function(t){return Wt(n,Vt(t))}))}function uu(t,r){if(!t||!t.length)return[];var e=ou(t);return null==r?e:Wt(e,(function(t){return Et(r,n,t)}))}var au=Ke((function(n,t){return qu(n)?he(n,t):[]})),cu=Ke((function(n){return gi(Rt(n,qu))})),fu=Ke((function(t){var r=Ko(t);return qu(r)&&(r=n),gi(Rt(t,qu),fo(r,2))})),lu=Ke((function(t){var r=Ko(t);return r="function"==typeof r?r:n,gi(Rt(t,qu),n,r)})),su=Ke(ou),hu=Ke((function(t){var r=t.length,e=r>1?t[r-1]:n;return e="function"==typeof e?(t.pop(),e):n,uu(t,e)}));function pu(n){var t=Nr(n);return t.__chain__=!0,t}function vu(n,t){return t(n)}var du=eo((function(t){var r=t.length,e=r?t[0]:0,i=this.__wrapped__,o=function(n){return ae(n,t)};return!(r>1||this.__actions__.length)&&i instanceof Zr&&mo(e)?((i=i.slice(e,+e+(r?1:0))).__actions__.push({func:vu,args:[o],thisArg:n}),new $r(i,this.__chain__).thru((function(t){return r&&!t.length&&t.push(n),t}))):this.thru(o)})),gu=Ri((function(n,t,r){Un.call(n,r)?++n[r]:ue(n,r,1)})),_u=Di($o),yu=Di(Zo);function bu(n,t){return(Zu(n)?St:pe)(n,fo(t,3))}function mu(n,t){return(Zu(n)?Ot:ve)(n,fo(t,3))}var wu=Ri((function(n,t,r){Un.call(n,r)?n[r].push(t):ue(n,r,[t])})),xu=Ke((function(n,t,r){var e=-1,i="function"==typeof t,o=Vu(n)?an(n.length):[];return pe(n,(function(n){o[++e]=i?Et(t,n,r):Me(n,t,r)})),o})),Iu=Ri((function(n,t,r){ue(n,r,t)}));function ju(n,t){return(Zu(n)?Wt:Fe)(n,fo(t,3))}var ku=Ri((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]})),Au=Ke((function(n,t){if(null==n)return[];var r=t.length;return r>1&&wo(n,t[0],t[1])?t=[]:r>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Ze(n,ye(t,1),[])})),Eu=pt||function(){return dt.Date.now()};function Cu(t,r,e){return r=e?n:r,r=t&&null==r?t.length:r,Qi(t,a,n,n,n,n,r)}function Su(r,e){var i;if("function"!=typeof e)throw new Mn(t);return r=da(r),function(){return--r>0&&(i=e.apply(this,arguments)),r<=1&&(e=n),i}}var Ou=Ke((function(n,t,r){var e=1;if(r.length){var i=lr(r,co(Ou));e|=o}return Qi(n,e,t,r,i)})),Mu=Ke((function(n,t,r){var e=3;if(r.length){var i=lr(r,co(Mu));e|=o}return Qi(t,e,n,r,i)}));function Ru(r,e,i){var o,u,a,c,f,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof r)throw new Mn(t);function d(t){var e=o,i=u;return o=u=n,s=t,c=r.apply(i,e)}function g(t){var r=t-l;return l===n||r>=e||r<0||p&&t-s>=a}function _(){var n=Eu();if(g(n))return y(n);f=Ro(_,function(n){var t=e-(n-l);return p?mr(t,a-(n-s)):t}(n))}function y(t){return f=n,v&&o?d(t):(o=u=n,c)}function b(){var t=Eu(),r=g(t);if(o=arguments,u=this,l=t,r){if(f===n)return function(n){return s=n,f=Ro(_,e),h?d(n):c}(l);if(p)return Ii(f),f=Ro(_,e),d(l)}return f===n&&(f=Ro(_,e)),c}return e=_a(e)||0,ta(i)&&(h=!!i.leading,a=(p="maxWait"in i)?br(_a(i.maxWait)||0,e):a,v="trailing"in i?!!i.trailing:v),b.cancel=function(){f!==n&&Ii(f),s=0,o=l=u=f=n},b.flush=function(){return f===n?c:y(Eu())},b}var zu=Ke((function(n,t){return se(n,1,t)})),Tu=Ke((function(n,t,r){return se(n,_a(t)||0,r)}));function Wu(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new Mn(t);var e=function(){var t=arguments,i=r?r.apply(this,t):t[0],o=e.cache;if(o.has(i))return o.get(i);var u=n.apply(this,t);return e.cache=o.set(i,u)||o,u};return e.cache=new(Wu.Cache||qr),e}function Lu(n){if("function"!=typeof n)throw new Mn(t);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Wu.Cache=qr;var Uu=wi((function(n,t){var r=(t=1==t.length&&Zu(t[0])?Wt(t[0],Xt(fo())):Wt(ye(t,1),Xt(fo()))).length;return Ke((function(e){for(var i=-1,o=mr(e.length,r);++i<o;)e[i]=t[i].call(this,e[i]);return Et(n,this,e)}))})),Bu=Ke((function(t,r){var e=lr(r,co(Bu));return Qi(t,o,n,r,e)})),Du=Ke((function(t,r){var e=lr(r,co(Du));return Qi(t,u,n,r,e)})),Fu=eo((function(t,r){return Qi(t,l,n,n,n,r)}));function Nu(n,t){return n===t||n!=n&&t!=t}var Pu=Vi(Ee),Ju=Vi((function(n,t){return n>=t})),$u=Re(function(){return arguments}())?Re:function(n){return ra(n)&&Un.call(n,"callee")&&!Hn.call(n,"callee")},Zu=an.isArray,Yu=wt?Xt(wt):function(n){return ra(n)&&Ae(n)==z};function Vu(n){return null!=n&&na(n.length)&&!Qu(n)}function qu(n){return ra(n)&&Vu(n)}var Gu=mt||_c,Hu=xt?Xt(xt):function(n){return ra(n)&&Ae(n)==b};function Ku(n){if(!ra(n))return!1;var t=Ae(n);return t==m||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!oa(n)}function Qu(n){if(!ta(n))return!1;var t=Ae(n);return t==x||t==I||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xu(n){return"number"==typeof n&&n==da(n)}function na(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=h}function ta(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function ra(n){return null!=n&&"object"==typeof n}var ea=It?Xt(It):function(n){return ra(n)&&go(n)==j};function ia(n){return"number"==typeof n||ra(n)&&Ae(n)==k}function oa(n){if(!ra(n)||Ae(n)!=A)return!1;var t=qn(n);if(null===t)return!0;var r=Un.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ln.call(r)==Nn}var ua=jt?Xt(jt):function(n){return ra(n)&&Ae(n)==C},aa=kt?Xt(kt):function(n){return ra(n)&&go(n)==S};function ca(n){return"string"==typeof n||!Zu(n)&&ra(n)&&Ae(n)==O}function fa(n){return"symbol"==typeof n||ra(n)&&Ae(n)==M}var la=At?Xt(At):function(n){return ra(n)&&na(n.length)&&!!ct[Ae(n)]},sa=Vi(De),ha=Vi((function(n,t){return n<=t}));function pa(n){if(!n)return[];if(Vu(n))return ca(n)?vr(n):Oi(n);if(Xn&&n[Xn])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[Xn]());var t=go(n);return(t==j?cr:t==S?sr:Na)(n)}function va(n){return n?(n=_a(n))===s||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function da(n){var t=va(n),r=t%1;return t==t?r?t-r:t:0}function ga(n){return n?ce(da(n),0,v):0}function _a(n){if("number"==typeof n)return n;if(fa(n))return p;if(ta(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ta(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=Qt(n);var r=_n.test(n);return r||bn.test(n)?ht(n.slice(2),r?2:8):gn.test(n)?p:+n}function ya(n){return Mi(n,za(n))}function ba(n){return null==n?"":li(n)}var ma=zi((function(n,t){if(ko(t)||Vu(t))Mi(t,Ra(t),n);else for(var r in t)Un.call(t,r)&&re(n,r,t[r])})),wa=zi((function(n,t){Mi(t,za(t),n)})),xa=zi((function(n,t,r,e){Mi(t,za(t),n,e)})),Ia=zi((function(n,t,r,e){Mi(t,Ra(t),n,e)})),ja=eo(ae),ka=Ke((function(t,r){t=Cn(t);var e=-1,i=r.length,o=i>2?r[2]:n;for(o&&wo(r[0],r[1],o)&&(i=1);++e<i;)for(var u=r[e],a=za(u),c=-1,f=a.length;++c<f;){var l=a[c],s=t[l];(s===n||Nu(s,Tn[l])&&!Un.call(t,l))&&(t[l]=u[l])}return t})),Aa=Ke((function(t){return t.push(n,no),Et(Wa,n,t)}));function Ea(t,r,e){var i=null==t?n:je(t,r);return i===n?e:i}function Ca(n,t){return null!=n&&_o(n,t,Se)}var Sa=Pi((function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fn.call(t)),n[t]=r}),tc(ic)),Oa=Pi((function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fn.call(t)),Un.call(n,t)?n[t].push(r):n[t]=[r]}),fo),Ma=Ke(Me);function Ra(n){return Vu(n)?Kr(n):Ue(n)}function za(n){return Vu(n)?Kr(n,!0):Be(n)}var Ta=zi((function(n,t,r){Je(n,t,r)})),Wa=zi((function(n,t,r,e){Je(n,t,r,e)})),La=eo((function(n,t){var r={};if(null==n)return r;var e=!1;t=Wt(t,(function(t){return t=mi(t,n),e||(e=t.length>1),t})),Mi(n,oo(n),r),e&&(r=fe(r,7,to));for(var i=t.length;i--;)hi(r,t[i]);return r})),Ua=eo((function(n,t){return null==n?{}:function(n,t){return Ye(n,t,(function(t,r){return Ca(n,r)}))}(n,t)}));function Ba(n,t){if(null==n)return{};var r=Wt(oo(n),(function(n){return[n]}));return t=fo(t),Ye(n,r,(function(n,r){return t(n,r[0])}))}var Da=Ki(Ra),Fa=Ki(za);function Na(n){return null==n?[]:nr(n,Ra(n))}var Pa=Ui((function(n,t,r){return t=t.toLowerCase(),n+(r?Ja(t):t)}));function Ja(n){return Ka(ba(n).toLowerCase())}function $a(n){return(n=ba(n))&&n.replace(wn,ir).replace(tt,"")}var Za=Ui((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),Ya=Ui((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),Va=Li("toLowerCase"),qa=Ui((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()})),Ga=Ui((function(n,t,r){return n+(r?" ":"")+Ka(t)})),Ha=Ui((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),Ka=Li("toUpperCase");function Qa(t,r,e){return t=ba(t),(r=e?n:r)===n?function(n){return ot.test(n)}(t)?function(n){return n.match(et)||[]}(t):function(n){return n.match(sn)||[]}(t):t.match(r)||[]}var Xa=Ke((function(t,r){try{return Et(t,n,r)}catch(n){return Ku(n)?n:new kn(n)}})),nc=eo((function(n,t){return St(t,(function(t){t=Bo(t),ue(n,t,Ou(n[t],n))})),n}));function tc(n){return function(){return n}}var rc=Fi(),ec=Fi(!0);function ic(n){return n}function oc(n){return Le("function"==typeof n?n:fe(n,1))}var uc=Ke((function(n,t){return function(r){return Me(r,n,t)}})),ac=Ke((function(n,t){return function(r){return Me(n,r,t)}}));function cc(n,t,r){var e=Ra(t),i=Ie(t,e);null!=r||ta(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=Ie(t,Ra(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),u=Qu(n);return St(i,(function(r){var e=t[r];n[r]=e,u&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Oi(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,Lt([this.value()],arguments))})})),n}function fc(){}var lc=$i(Wt),sc=$i(Mt),hc=$i(Dt);function pc(n){return xo(n)?Vt(Bo(n)):function(n){return function(t){return je(t,n)}}(n)}var vc=Yi(),dc=Yi(!0);function gc(){return[]}function _c(){return!1}var yc,bc=Ji((function(n,t){return n+t}),0),mc=Gi("ceil"),wc=Ji((function(n,t){return n/t}),1),xc=Gi("floor"),Ic=Ji((function(n,t){return n*t}),1),jc=Gi("round"),kc=Ji((function(n,t){return n-t}),0);return Nr.after=function(n,r){if("function"!=typeof r)throw new Mn(t);return n=da(n),function(){if(--n<1)return r.apply(this,arguments)}},Nr.ary=Cu,Nr.assign=ma,Nr.assignIn=wa,Nr.assignInWith=xa,Nr.assignWith=Ia,Nr.at=ja,Nr.before=Su,Nr.bind=Ou,Nr.bindAll=nc,Nr.bindKey=Mu,Nr.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Zu(n)?n:[n]},Nr.chain=pu,Nr.chunk=function(t,r,e){r=(e?wo(t,r,e):r===n)?1:br(da(r),0);var i=null==t?0:t.length;if(!i||r<1)return[];for(var o=0,u=0,a=an(gt(i/r));o<i;)a[u++]=ii(t,o,o+=r);return a},Nr.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,i=[];++t<r;){var o=n[t];o&&(i[e++]=o)}return i},Nr.concat=function(){var n=arguments.length;if(!n)return[];for(var t=an(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return Lt(Zu(r)?Oi(r):[r],ye(t,1))},Nr.cond=function(n){var r=null==n?0:n.length,e=fo();return n=r?Wt(n,(function(n){if("function"!=typeof n[1])throw new Mn(t);return[e(n[0]),n[1]]})):[],Ke((function(t){for(var e=-1;++e<r;){var i=n[e];if(Et(i[0],this,t))return Et(i[1],this,t)}}))},Nr.conforms=function(n){return function(n){var t=Ra(n);return function(r){return le(r,n,t)}}(fe(n,1))},Nr.constant=tc,Nr.countBy=gu,Nr.create=function(n,t){var r=Pr(n);return null==t?r:oe(r,t)},Nr.curry=function t(r,e,i){var o=Qi(r,8,n,n,n,n,n,e=i?n:e);return o.placeholder=t.placeholder,o},Nr.curryRight=function t(r,e,o){var u=Qi(r,i,n,n,n,n,n,e=o?n:e);return u.placeholder=t.placeholder,u},Nr.debounce=Ru,Nr.defaults=ka,Nr.defaultsDeep=Aa,Nr.defer=zu,Nr.delay=Tu,Nr.difference=No,Nr.differenceBy=Po,Nr.differenceWith=Jo,Nr.drop=function(t,r,e){var i=null==t?0:t.length;return i?ii(t,(r=e||r===n?1:da(r))<0?0:r,i):[]},Nr.dropRight=function(t,r,e){var i=null==t?0:t.length;return i?ii(t,0,(r=i-(r=e||r===n?1:da(r)))<0?0:r):[]},Nr.dropRightWhile=function(n,t){return n&&n.length?vi(n,fo(t,3),!0,!0):[]},Nr.dropWhile=function(n,t){return n&&n.length?vi(n,fo(t,3),!0):[]},Nr.fill=function(t,r,e,i){var o=null==t?0:t.length;return o?(e&&"number"!=typeof e&&wo(t,r,e)&&(e=0,i=o),function(t,r,e,i){var o=t.length;for((e=da(e))<0&&(e=-e>o?0:o+e),(i=i===n||i>o?o:da(i))<0&&(i+=o),i=e>i?0:ga(i);e<i;)t[e++]=r;return t}(t,r,e,i)):[]},Nr.filter=function(n,t){return(Zu(n)?Rt:_e)(n,fo(t,3))},Nr.flatMap=function(n,t){return ye(ju(n,t),1)},Nr.flatMapDeep=function(n,t){return ye(ju(n,t),s)},Nr.flatMapDepth=function(t,r,e){return e=e===n?1:da(e),ye(ju(t,r),e)},Nr.flatten=Yo,Nr.flattenDeep=function(n){return null!=n&&n.length?ye(n,s):[]},Nr.flattenDepth=function(t,r){return null!=t&&t.length?ye(t,r=r===n?1:da(r)):[]},Nr.flip=function(n){return Qi(n,512)},Nr.flow=rc,Nr.flowRight=ec,Nr.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var i=n[t];e[i[0]]=i[1]}return e},Nr.functions=function(n){return null==n?[]:Ie(n,Ra(n))},Nr.functionsIn=function(n){return null==n?[]:Ie(n,za(n))},Nr.groupBy=wu,Nr.initial=function(n){return null!=n&&n.length?ii(n,0,-1):[]},Nr.intersection=qo,Nr.intersectionBy=Go,Nr.intersectionWith=Ho,Nr.invert=Sa,Nr.invertBy=Oa,Nr.invokeMap=xu,Nr.iteratee=oc,Nr.keyBy=Iu,Nr.keys=Ra,Nr.keysIn=za,Nr.map=ju,Nr.mapKeys=function(n,t){var r={};return t=fo(t,3),we(n,(function(n,e,i){ue(r,t(n,e,i),n)})),r},Nr.mapValues=function(n,t){var r={};return t=fo(t,3),we(n,(function(n,e,i){ue(r,e,t(n,e,i))})),r},Nr.matches=function(n){return Ne(fe(n,1))},Nr.matchesProperty=function(n,t){return Pe(n,fe(t,1))},Nr.memoize=Wu,Nr.merge=Ta,Nr.mergeWith=Wa,Nr.method=uc,Nr.methodOf=ac,Nr.mixin=cc,Nr.negate=Lu,Nr.nthArg=function(n){return n=da(n),Ke((function(t){return $e(t,n)}))},Nr.omit=La,Nr.omitBy=function(n,t){return Ba(n,Lu(fo(t)))},Nr.once=function(n){return Su(2,n)},Nr.orderBy=function(t,r,e,i){return null==t?[]:(Zu(r)||(r=null==r?[]:[r]),Zu(e=i?n:e)||(e=null==e?[]:[e]),Ze(t,r,e))},Nr.over=lc,Nr.overArgs=Uu,Nr.overEvery=sc,Nr.overSome=hc,Nr.partial=Bu,Nr.partialRight=Du,Nr.partition=ku,Nr.pick=Ua,Nr.pickBy=Ba,Nr.property=pc,Nr.propertyOf=function(t){return function(r){return null==t?n:je(t,r)}},Nr.pull=Qo,Nr.pullAll=Xo,Nr.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?Ve(n,t,fo(r,2)):n},Nr.pullAllWith=function(t,r,e){return t&&t.length&&r&&r.length?Ve(t,r,n,e):t},Nr.pullAt=nu,Nr.range=vc,Nr.rangeRight=dc,Nr.rearg=Fu,Nr.reject=function(n,t){return(Zu(n)?Rt:_e)(n,Lu(fo(t,3)))},Nr.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,i=[],o=n.length;for(t=fo(t,3);++e<o;){var u=n[e];t(u,e,n)&&(r.push(u),i.push(e))}return qe(n,i),r},Nr.rest=function(r,e){if("function"!=typeof r)throw new Mn(t);return Ke(r,e=e===n?e:da(e))},Nr.reverse=tu,Nr.sampleSize=function(t,r,e){return r=(e?wo(t,r,e):r===n)?1:da(r),(Zu(t)?Xr:Xe)(t,r)},Nr.set=function(n,t,r){return null==n?n:ni(n,t,r)},Nr.setWith=function(t,r,e,i){return i="function"==typeof i?i:n,null==t?t:ni(t,r,e,i)},Nr.shuffle=function(n){return(Zu(n)?ne:ei)(n)},Nr.slice=function(t,r,e){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&wo(t,r,e)?(r=0,e=i):(r=null==r?0:da(r),e=e===n?i:da(e)),ii(t,r,e)):[]},Nr.sortBy=Au,Nr.sortedUniq=function(n){return n&&n.length?ci(n):[]},Nr.sortedUniqBy=function(n,t){return n&&n.length?ci(n,fo(t,2)):[]},Nr.split=function(t,r,e){return e&&"number"!=typeof e&&wo(t,r,e)&&(r=e=n),(e=e===n?v:e>>>0)?(t=ba(t))&&("string"==typeof r||null!=r&&!ua(r))&&!(r=li(r))&&ar(t)?xi(vr(t),0,e):t.split(r,e):[]},Nr.spread=function(n,r){if("function"!=typeof n)throw new Mn(t);return r=null==r?0:br(da(r),0),Ke((function(t){var e=t[r],i=xi(t,0,r);return e&&Lt(i,e),Et(n,this,i)}))},Nr.tail=function(n){var t=null==n?0:n.length;return t?ii(n,1,t):[]},Nr.take=function(t,r,e){return t&&t.length?ii(t,0,(r=e||r===n?1:da(r))<0?0:r):[]},Nr.takeRight=function(t,r,e){var i=null==t?0:t.length;return i?ii(t,(r=i-(r=e||r===n?1:da(r)))<0?0:r,i):[]},Nr.takeRightWhile=function(n,t){return n&&n.length?vi(n,fo(t,3),!1,!0):[]},Nr.takeWhile=function(n,t){return n&&n.length?vi(n,fo(t,3)):[]},Nr.tap=function(n,t){return t(n),n},Nr.throttle=function(n,r,e){var i=!0,o=!0;if("function"!=typeof n)throw new Mn(t);return ta(e)&&(i="leading"in e?!!e.leading:i,o="trailing"in e?!!e.trailing:o),Ru(n,r,{leading:i,maxWait:r,trailing:o})},Nr.thru=vu,Nr.toArray=pa,Nr.toPairs=Da,Nr.toPairsIn=Fa,Nr.toPath=function(n){return Zu(n)?Wt(n,Bo):fa(n)?[n]:Oi(Uo(ba(n)))},Nr.toPlainObject=ya,Nr.transform=function(n,t,r){var e=Zu(n),i=e||Gu(n)||la(n);if(t=fo(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:ta(n)&&Qu(o)?Pr(qn(n)):{}}return(i?St:we)(n,(function(n,e,i){return t(r,n,e,i)})),r},Nr.unary=function(n){return Cu(n,1)},Nr.union=ru,Nr.unionBy=eu,Nr.unionWith=iu,Nr.uniq=function(n){return n&&n.length?si(n):[]},Nr.uniqBy=function(n,t){return n&&n.length?si(n,fo(t,2)):[]},Nr.uniqWith=function(t,r){return r="function"==typeof r?r:n,t&&t.length?si(t,n,r):[]},Nr.unset=function(n,t){return null==n||hi(n,t)},Nr.unzip=ou,Nr.unzipWith=uu,Nr.update=function(n,t,r){return null==n?n:pi(n,t,bi(r))},Nr.updateWith=function(t,r,e,i){return i="function"==typeof i?i:n,null==t?t:pi(t,r,bi(e),i)},Nr.values=Na,Nr.valuesIn=function(n){return null==n?[]:nr(n,za(n))},Nr.without=au,Nr.words=Qa,Nr.wrap=function(n,t){return Bu(bi(t),n)},Nr.xor=cu,Nr.xorBy=fu,Nr.xorWith=lu,Nr.zip=su,Nr.zipObject=function(n,t){return _i(n||[],t||[],re)},Nr.zipObjectDeep=function(n,t){return _i(n||[],t||[],ni)},Nr.zipWith=hu,Nr.entries=Da,Nr.entriesIn=Fa,Nr.extend=wa,Nr.extendWith=xa,cc(Nr,Nr),Nr.add=bc,Nr.attempt=Xa,Nr.camelCase=Pa,Nr.capitalize=Ja,Nr.ceil=mc,Nr.clamp=function(t,r,e){return e===n&&(e=r,r=n),e!==n&&(e=(e=_a(e))==e?e:0),r!==n&&(r=(r=_a(r))==r?r:0),ce(_a(t),r,e)},Nr.clone=function(n){return fe(n,4)},Nr.cloneDeep=function(n){return fe(n,5)},Nr.cloneDeepWith=function(t,r){return fe(t,5,r="function"==typeof r?r:n)},Nr.cloneWith=function(t,r){return fe(t,4,r="function"==typeof r?r:n)},Nr.conformsTo=function(n,t){return null==t||le(n,t,Ra(t))},Nr.deburr=$a,Nr.defaultTo=function(n,t){return null==n||n!=n?t:n},Nr.divide=wc,Nr.endsWith=function(t,r,e){t=ba(t),r=li(r);var i=t.length,o=e=e===n?i:ce(da(e),0,i);return(e-=r.length)>=0&&t.slice(e,o)==r},Nr.eq=Nu,Nr.escape=function(n){return(n=ba(n))&&H.test(n)?n.replace(q,or):n},Nr.escapeRegExp=function(n){return(n=ba(n))&&on.test(n)?n.replace(en,"\\$&"):n},Nr.every=function(t,r,e){var i=Zu(t)?Mt:de;return e&&wo(t,r,e)&&(r=n),i(t,fo(r,3))},Nr.find=_u,Nr.findIndex=$o,Nr.findKey=function(n,t){return Nt(n,fo(t,3),we)},Nr.findLast=yu,Nr.findLastIndex=Zo,Nr.findLastKey=function(n,t){return Nt(n,fo(t,3),xe)},Nr.floor=xc,Nr.forEach=bu,Nr.forEachRight=mu,Nr.forIn=function(n,t){return null==n?n:be(n,fo(t,3),za)},Nr.forInRight=function(n,t){return null==n?n:me(n,fo(t,3),za)},Nr.forOwn=function(n,t){return n&&we(n,fo(t,3))},Nr.forOwnRight=function(n,t){return n&&xe(n,fo(t,3))},Nr.get=Ea,Nr.gt=Pu,Nr.gte=Ju,Nr.has=function(n,t){return null!=n&&_o(n,t,Ce)},Nr.hasIn=Ca,Nr.head=Vo,Nr.identity=ic,Nr.includes=function(n,t,r,e){n=Vu(n)?n:Na(n),r=r&&!e?da(r):0;var i=n.length;return r<0&&(r=br(i+r,0)),ca(n)?r<=i&&n.indexOf(t,r)>-1:!!i&&Jt(n,t,r)>-1},Nr.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var i=null==r?0:da(r);return i<0&&(i=br(e+i,0)),Jt(n,t,i)},Nr.inRange=function(t,r,e){return r=va(r),e===n?(e=r,r=0):e=va(e),function(n,t,r){return n>=mr(t,r)&&n<br(t,r)}(t=_a(t),r,e)},Nr.invoke=Ma,Nr.isArguments=$u,Nr.isArray=Zu,Nr.isArrayBuffer=Yu,Nr.isArrayLike=Vu,Nr.isArrayLikeObject=qu,Nr.isBoolean=function(n){return!0===n||!1===n||ra(n)&&Ae(n)==y},Nr.isBuffer=Gu,Nr.isDate=Hu,Nr.isElement=function(n){return ra(n)&&1===n.nodeType&&!oa(n)},Nr.isEmpty=function(n){if(null==n)return!0;if(Vu(n)&&(Zu(n)||"string"==typeof n||"function"==typeof n.splice||Gu(n)||la(n)||$u(n)))return!n.length;var t=go(n);if(t==j||t==S)return!n.size;if(ko(n))return!Ue(n).length;for(var r in n)if(Un.call(n,r))return!1;return!0},Nr.isEqual=function(n,t){return ze(n,t)},Nr.isEqualWith=function(t,r,e){var i=(e="function"==typeof e?e:n)?e(t,r):n;return i===n?ze(t,r,n,e):!!i},Nr.isError=Ku,Nr.isFinite=function(n){return"number"==typeof n&&Ft(n)},Nr.isFunction=Qu,Nr.isInteger=Xu,Nr.isLength=na,Nr.isMap=ea,Nr.isMatch=function(n,t){return n===t||Te(n,t,so(t))},Nr.isMatchWith=function(t,r,e){return e="function"==typeof e?e:n,Te(t,r,so(r),e)},Nr.isNaN=function(n){return ia(n)&&n!=+n},Nr.isNative=function(n){if(jo(n))throw new kn("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return We(n)},Nr.isNil=function(n){return null==n},Nr.isNull=function(n){return null===n},Nr.isNumber=ia,Nr.isObject=ta,Nr.isObjectLike=ra,Nr.isPlainObject=oa,Nr.isRegExp=ua,Nr.isSafeInteger=function(n){return Xu(n)&&n>=-9007199254740991&&n<=h},Nr.isSet=aa,Nr.isString=ca,Nr.isSymbol=fa,Nr.isTypedArray=la,Nr.isUndefined=function(t){return t===n},Nr.isWeakMap=function(n){return ra(n)&&go(n)==R},Nr.isWeakSet=function(n){return ra(n)&&"[object WeakSet]"==Ae(n)},Nr.join=function(n,t){return null==n?"":qt.call(n,t)},Nr.kebabCase=Za,Nr.last=Ko,Nr.lastIndexOf=function(t,r,e){var i=null==t?0:t.length;if(!i)return-1;var o=i;return e!==n&&(o=(o=da(e))<0?br(i+o,0):mr(o,i-1)),r==r?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(t,r,o):Pt(t,Zt,o,!0)},Nr.lowerCase=Ya,Nr.lowerFirst=Va,Nr.lt=sa,Nr.lte=ha,Nr.max=function(t){return t&&t.length?ge(t,ic,Ee):n},Nr.maxBy=function(t,r){return t&&t.length?ge(t,fo(r,2),Ee):n},Nr.mean=function(n){return Yt(n,ic)},Nr.meanBy=function(n,t){return Yt(n,fo(t,2))},Nr.min=function(t){return t&&t.length?ge(t,ic,De):n},Nr.minBy=function(t,r){return t&&t.length?ge(t,fo(r,2),De):n},Nr.stubArray=gc,Nr.stubFalse=_c,Nr.stubObject=function(){return{}},Nr.stubString=function(){return""},Nr.stubTrue=function(){return!0},Nr.multiply=Ic,Nr.nth=function(t,r){return t&&t.length?$e(t,da(r)):n},Nr.noConflict=function(){return dt._===this&&(dt._=Pn),this},Nr.noop=fc,Nr.now=Eu,Nr.pad=function(n,t,r){n=ba(n);var e=(t=da(t))?pr(n):0;if(!t||e>=t)return n;var i=(t-e)/2;return Zi(_t(i),r)+n+Zi(gt(i),r)},Nr.padEnd=function(n,t,r){n=ba(n);var e=(t=da(t))?pr(n):0;return t&&e<t?n+Zi(t-e,r):n},Nr.padStart=function(n,t,r){n=ba(n);var e=(t=da(t))?pr(n):0;return t&&e<t?Zi(t-e,r)+n:n},Nr.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),xr(ba(n).replace(un,""),t||0)},Nr.random=function(t,r,e){if(e&&"boolean"!=typeof e&&wo(t,r,e)&&(r=e=n),e===n&&("boolean"==typeof r?(e=r,r=n):"boolean"==typeof t&&(e=t,t=n)),t===n&&r===n?(t=0,r=1):(t=va(t),r===n?(r=t,t=0):r=va(r)),t>r){var i=t;t=r,r=i}if(e||t%1||r%1){var o=Ir();return mr(t+o*(r-t+st("1e-"+((o+"").length-1))),r)}return Ge(t,r)},Nr.reduce=function(n,t,r){var e=Zu(n)?Ut:Gt,i=arguments.length<3;return e(n,fo(t,4),r,i,pe)},Nr.reduceRight=function(n,t,r){var e=Zu(n)?Bt:Gt,i=arguments.length<3;return e(n,fo(t,4),r,i,ve)},Nr.repeat=function(t,r,e){return r=(e?wo(t,r,e):r===n)?1:da(r),He(ba(t),r)},Nr.replace=function(){var n=arguments,t=ba(n[0]);return n.length<3?t:t.replace(n[1],n[2])},Nr.result=function(t,r,e){var i=-1,o=(r=mi(r,t)).length;for(o||(o=1,t=n);++i<o;){var u=null==t?n:t[Bo(r[i])];u===n&&(i=o,u=e),t=Qu(u)?u.call(t):u}return t},Nr.round=jc,Nr.runInContext=c,Nr.sample=function(n){return(Zu(n)?Qr:Qe)(n)},Nr.size=function(n){if(null==n)return 0;if(Vu(n))return ca(n)?pr(n):n.length;var t=go(n);return t==j||t==S?n.size:Ue(n).length},Nr.snakeCase=qa,Nr.some=function(t,r,e){var i=Zu(t)?Dt:oi;return e&&wo(t,r,e)&&(r=n),i(t,fo(r,3))},Nr.sortedIndex=function(n,t){return ui(n,t)},Nr.sortedIndexBy=function(n,t,r){return ai(n,t,fo(r,2))},Nr.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=ui(n,t);if(e<r&&Nu(n[e],t))return e}return-1},Nr.sortedLastIndex=function(n,t){return ui(n,t,!0)},Nr.sortedLastIndexBy=function(n,t,r){return ai(n,t,fo(r,2),!0)},Nr.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var r=ui(n,t,!0)-1;if(Nu(n[r],t))return r}return-1},Nr.startCase=Ga,Nr.startsWith=function(n,t,r){return n=ba(n),r=null==r?0:ce(da(r),0,n.length),t=li(t),n.slice(r,r+t.length)==t},Nr.subtract=kc,Nr.sum=function(n){return n&&n.length?Ht(n,ic):0},Nr.sumBy=function(n,t){return n&&n.length?Ht(n,fo(t,2)):0},Nr.template=function(t,r,e){var i=Nr.templateSettings;e&&wo(t,r,e)&&(r=n),t=ba(t),r=xa({},r,i,Xi);var o,u,a=xa({},r.imports,i.imports,Xi),c=Ra(a),f=nr(a,c),l=0,s=r.interpolate||xn,h="__p += '",p=Sn((r.escape||xn).source+"|"+s.source+"|"+(s===X?vn:xn).source+"|"+(r.evaluate||xn).source+"|$","g"),v="//# sourceURL="+(Un.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";t.replace(p,(function(n,r,e,i,a,c){return e||(e=i),h+=t.slice(l,c).replace(In,ur),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),a&&(u=!0,h+="';\n"+a+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=c+n.length,n})),h+="';\n";var d=Un.call(r,"variable")&&r.variable;if(d){if(hn.test(d))throw new kn("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(u?h.replace($,""):h).replace(Z,"$1").replace(Y,"$1;"),h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Xa((function(){return An(c,v+"return "+h).apply(n,f)}));if(g.source=h,Ku(g))throw g;return g},Nr.times=function(n,t){if((n=da(n))<1||n>h)return[];var r=v,e=mr(n,v);t=fo(t),n-=v;for(var i=Kt(e,t);++r<n;)t(r);return i},Nr.toFinite=va,Nr.toInteger=da,Nr.toLength=ga,Nr.toLower=function(n){return ba(n).toLowerCase()},Nr.toNumber=_a,Nr.toSafeInteger=function(n){return n?ce(da(n),-9007199254740991,h):0===n?n:0},Nr.toString=ba,Nr.toUpper=function(n){return ba(n).toUpperCase()},Nr.trim=function(t,r,e){if((t=ba(t))&&(e||r===n))return Qt(t);if(!t||!(r=li(r)))return t;var i=vr(t),o=vr(r);return xi(i,rr(i,o),er(i,o)+1).join("")},Nr.trimEnd=function(t,r,e){if((t=ba(t))&&(e||r===n))return t.slice(0,dr(t)+1);if(!t||!(r=li(r)))return t;var i=vr(t);return xi(i,0,er(i,vr(r))+1).join("")},Nr.trimStart=function(t,r,e){if((t=ba(t))&&(e||r===n))return t.replace(un,"");if(!t||!(r=li(r)))return t;var i=vr(t);return xi(i,rr(i,vr(r))).join("")},Nr.truncate=function(t,r){var e=30,i="...";if(ta(r)){var o="separator"in r?r.separator:o;e="length"in r?da(r.length):e,i="omission"in r?li(r.omission):i}var u=(t=ba(t)).length;if(ar(t)){var a=vr(t);u=a.length}if(e>=u)return t;var c=e-pr(i);if(c<1)return i;var f=a?xi(a,0,c).join(""):t.slice(0,c);if(o===n)return f+i;if(a&&(c+=f.length-c),ua(o)){if(t.slice(c).search(o)){var l,s=f;for(o.global||(o=Sn(o.source,ba(dn.exec(o))+"g")),o.lastIndex=0;l=o.exec(s);)var h=l.index;f=f.slice(0,h===n?c:h)}}else if(t.indexOf(li(o),c)!=c){var p=f.lastIndexOf(o);p>-1&&(f=f.slice(0,p))}return f+i},Nr.unescape=function(n){return(n=ba(n))&&G.test(n)?n.replace(V,gr):n},Nr.uniqueId=function(n){var t=++Bn;return ba(n)+t},Nr.upperCase=Ha,Nr.upperFirst=Ka,Nr.each=bu,Nr.eachRight=mu,Nr.first=Vo,cc(Nr,(yc={},we(Nr,(function(n,t){Un.call(Nr.prototype,t)||(yc[t]=n)})),yc),{chain:!1}),Nr.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){Nr[n].placeholder=Nr})),St(["drop","take"],(function(t,r){Zr.prototype[t]=function(e){e=e===n?1:br(da(e),0);var i=this.__filtered__&&!r?new Zr(this):this.clone();return i.__filtered__?i.__takeCount__=mr(e,i.__takeCount__):i.__views__.push({size:mr(e,v),type:t+(i.__dir__<0?"Right":"")}),i},Zr.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),St(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;Zr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:fo(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),St(["head","last"],(function(n,t){var r="take"+(t?"Right":"");Zr.prototype[n]=function(){return this[r](1).value()[0]}})),St(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");Zr.prototype[n]=function(){return this.__filtered__?new Zr(this):this[r](1)}})),Zr.prototype.compact=function(){return this.filter(ic)},Zr.prototype.find=function(n){return this.filter(n).head()},Zr.prototype.findLast=function(n){return this.reverse().find(n)},Zr.prototype.invokeMap=Ke((function(n,t){return"function"==typeof n?new Zr(this):this.map((function(r){return Me(r,n,t)}))})),Zr.prototype.reject=function(n){return this.filter(Lu(fo(n)))},Zr.prototype.slice=function(t,r){t=da(t);var e=this;return e.__filtered__&&(t>0||r<0)?new Zr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),r!==n&&(e=(r=da(r))<0?e.dropRight(-r):e.take(r-t)),e)},Zr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Zr.prototype.toArray=function(){return this.take(v)},we(Zr.prototype,(function(t,r){var e=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),o=Nr[i?"take"+("last"==r?"Right":""):r],u=i||/^find/.test(r);o&&(Nr.prototype[r]=function(){var r=this.__wrapped__,a=i?[1]:arguments,c=r instanceof Zr,f=a[0],l=c||Zu(r),s=function(n){var t=o.apply(Nr,Lt([n],a));return i&&h?t[0]:t};l&&e&&"function"==typeof f&&1!=f.length&&(c=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=u&&!h,d=c&&!p;if(!u&&l){r=d?r:new Zr(this);var g=t.apply(r,a);return g.__actions__.push({func:vu,args:[s],thisArg:n}),new $r(g,h)}return v&&d?t.apply(this,a):(g=this.thru(s),v?i?g.value()[0]:g.value():g)})})),St(["pop","push","shift","sort","splice","unshift"],(function(n){var t=Rn[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Nr.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var i=this.value();return t.apply(Zu(i)?i:[],n)}return this[r]((function(r){return t.apply(Zu(r)?r:[],n)}))}})),we(Zr.prototype,(function(n,t){var r=Nr[t];if(r){var e=r.name+"";Un.call(Rr,e)||(Rr[e]=[]),Rr[e].push({name:t,func:r})}})),Rr[Ni(n,2).name]=[{name:"wrapper",func:n}],Zr.prototype.clone=function(){var n=new Zr(this.__wrapped__);return n.__actions__=Oi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Oi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Oi(this.__views__),n},Zr.prototype.reverse=function(){if(this.__filtered__){var n=new Zr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},Zr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=Zu(n),e=t<0,i=r?n.length:0,o=function(n,t,r){for(var e=-1,i=r.length;++e<i;){var o=r[e],u=o.size;switch(o.type){case"drop":n+=u;break;case"dropRight":t-=u;break;case"take":t=mr(t,n+u);break;case"takeRight":n=br(n,t-u)}}return{start:n,end:t}}(0,i,this.__views__),u=o.start,a=o.end,c=a-u,f=e?a:u-1,l=this.__iteratees__,s=l.length,h=0,p=mr(c,this.__takeCount__);if(!r||!e&&i==c&&p==c)return di(n,this.__actions__);var v=[];n:for(;c--&&h<p;){for(var d=-1,g=n[f+=t];++d<s;){var _=l[d],y=_.iteratee,b=_.type,m=y(g);if(2==b)g=m;else if(!m){if(1==b)continue n;break n}}v[h++]=g}return v},Nr.prototype.at=du,Nr.prototype.chain=function(){return pu(this)},Nr.prototype.commit=function(){return new $r(this.value(),this.__chain__)},Nr.prototype.next=function(){this.__values__===n&&(this.__values__=pa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Nr.prototype.plant=function(t){for(var r,e=this;e instanceof Jr;){var i=Fo(e);i.__index__=0,i.__values__=n,r?o.__wrapped__=i:r=i;var o=i;e=e.__wrapped__}return o.__wrapped__=t,r},Nr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Zr){var r=t;return this.__actions__.length&&(r=new Zr(this)),(r=r.reverse()).__actions__.push({func:vu,args:[tu],thisArg:n}),new $r(r,this.__chain__)}return this.thru(tu)},Nr.prototype.toJSON=Nr.prototype.valueOf=Nr.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Nr.prototype.first=Nr.prototype.head,Xn&&(Nr.prototype[Xn]=function(){return this}),Nr}();_t?((_t.exports=_r)._=_r,gt._=_r):dt._=_r}.call(w);var I=x.exports,j=function(t){var r=t.api_key,c=t.user_id,f=t.user_token,l=t.user_profile,s=i(!1),p=s[0],v=s[1],d=i(!1),w=d[0],x=d[1],j=i(null),k=j[0],A=j[1],E=i(!1),C=E[0],S=E[1],O=i(null),M=O[0],R=O[1],z=i({}),T=z[0],W=z[1];e((function(){var n={api_key:r,user_id:c,user_token:f,user_profile:l};if(!w&&!I.isEqual(n,T)){var t=!0;return r&&u(void 0,void 0,void 0,(function(){var e,i,u,s,p,d,_,y,w,I,j,k,E,C,S;return a(this,(function(a){switch(a.label){case 0:if(!r)return m("Missing required configuration: api_key"),[2];x(!0),(e=c||void 0)||(e=function(n){var t,r="; ".concat(document.cookie).split("; ".concat(n,"="));if(2===r.length)return null===(t=r.pop())||void 0===t?void 0:t.split(";").shift()}("rblyn_anon"),e||(O="rblyn_anon",M=e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var t=16*Math.random()|0;return("x"===n?t:3&t|8).toString(16)})),z=365,(T=new Date).setTime(T.getTime()+24*z*60*60*1e3),document.cookie="".concat(O,"=").concat(M,";expires=").concat(T.toUTCString(),";path=/"))),a.label=1;case 1:return a.trys.push([1,4,5,6]),[4,h(r,e,f)];case 2:return i=a.sent(),u=["email","name","mobile","platform","OS","browser","sdk_version","device","screen_size"],s=function(){return{platform:"web",os:(null===(t=navigator.userAgentData)||void 0===t?void 0:t.platform)||(/Windows|Mac|Linux|Android|iOS/.exec(navigator.userAgent)||["Unknown"])[0],browser:b(),sdk_version:"1.1.9-staging.0",device:(n=navigator.userAgent.toLowerCase(),/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(n)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(n)?"mobile":"desktop"),screen_size:{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}};var n,t}(),p=o(o({},s),l?Object.fromEntries(Object.entries(l).filter((function(n){var t=n[0];return u.includes(t)}))):{}),d={chatbotId:r,userId:e,token:f,domain:"",brand_colour:(null===(I=null===(w=i.user.org_info.brand_config)||void 0===w?void 0:w.colors)||void 0===I?void 0:I.brand_color)||"",image_url:(null===(k=null===(j=i.user.org_info)||void 0===j?void 0:j.brand_config)||void 0===k?void 0:k.launcher_logo_url)||"",userProfile:p,chat_interface_config:{chat_bubble_prompts:[],display_name:(null===(E=i.user.org_info.brand_config)||void 0===E?void 0:E.display_name)||"",welcome_message:(null===(C=i.user.org_info.brand_config)||void 0===C?void 0:C.welcome_message)||"Hey! What can we help you with today?",redirect_url:(null===(S=i.user.org_info.brand_config)||void 0===S?void 0:S.redirect_url)||""}},R(d),W(n),[4,g(d,v,A)];case 3:return a.sent(),[3,6];case 4:return _=a.sent(),t?(y=_ instanceof Error?_.message:"Failed to initialize chatbot",m("Chatbot initialization error:",y),A(y),[3,6]):[2];case 5:return t&&x(!1),[7];case 6:return[2]}var O,M,z,T}))})),function(){t=!1}}}),[r,c,f,l]);return r&&c?k?(m("Chatbot error:",k),null):M&&p?n.createElement(n.Fragment,null,n.createElement(_,{config:M,toggleIframe:function(){return S(!C)},isIframeVisible:C}),n.createElement(y,{config:M,isVisible:C,onClose:function(){S(!1)}})):null:(m("Missing required configuration: api_key or user_id"),null)},k=function(n){var t=i({isLoading:!0,isInitialized:!1,error:null}),r=t[0],u=t[1],a=function(n){u((function(t){return o(o({},t),{isInitialized:n})}))},c=function(n){u((function(t){return o(o({},t),{error:n})}))};return e((function(){!function(){try{g(n,a,c)}catch(n){u((function(t){return o(o({},t),{error:n instanceof Error?n.message:"Failed to initialize SDK",isLoading:!1})}))}}()}),[n.chatbotId,n.userId]),r};export{j as Chatbot,k as useChatbot};
2
2
  //# sourceMappingURL=index.js.map