You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
90 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

/*! For license information please see app.7843b5df5fa7b070bc70.js.LICENSE.txt */
(self.__cmc_webpackJsonp__=self.__cmc_webpackJsonp__||[]).push([[143],{82738:function(e,t,n){"use strict";var r=n(1625),o=n.n(r),a=n(67294),c=n(93379),i=n.n(c),l=n(7795),u=n.n(l),s=n(90569),f=n.n(s),m=n(3565),p=n.n(m),h=n(19216),d=n.n(h),y=n(44589),b=n.n(y),v=n(51424),g={};g.styleTagTransform=b(),g.setAttributes=p(),g.insert=f().bind(null,"head"),g.domAPI=u(),g.insertStyleElement=d(),i()(v.Z,g),v.Z&&v.Z.locals&&v.Z.locals;var S,w,k=n(71893),x=n(61733),O=n.n(x),E=n(47934),j=n.n(E),C=n(66206),D=n.n(C),P=n(69376),R=n.n(P),L=n(8275),T=n.n(L);function I(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var A=k.default.div(S||(S=I(["\n display: flex;\n flex-direction: column;\n"]))),_=k.default.div(w||(w=I(["\n display: flex;\n flex-direction: row;\n"]))),F=n(46401),B=n.n(F),M=n(27877),G=n.n(M),N=n(96816),z=n.n(N),q=n(95414),U=n.n(q),W=n(76416),H=n.n(W),$=n(25947),Z=n(35458),X=n.n(Z);function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Y(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V,ee=function(e){var t=e.style,n=e.query,r=e.setQuery,o=e.isLoading,c=e.triggerSearch,i=e.resetChat,l=(0,$.useSplunkTheme)().textGray;return a.createElement(A,{style:Q({},t)},a.createElement(_,{style:{alignItems:"end"}},a.createElement(X(),{contentRelationship:"label",content:"Reset Chat",style:{margin:"0 10px"}},a.createElement(H(),{appearance:"pill",style:{width:"12px"},screenReaderText:null,hideDefaultTooltip:!0,icon:a.createElement(z(),null),onClick:i})),a.createElement(B(),{style:{height:"100%",alignSelf:"center"},value:n,onChange:function(e,t){var n=t.value;return r(n)},onKeyDown:function(e){"Enter"===e.key&&n.length&&!o&&c(n)}}),a.createElement(X(),{contentRelationship:"label",content:"Submit",style:{margin:"0 10px"}},a.createElement(H(),{appearance:"primary",disabled:o||0===n.length,style:{width:"48px"},icon:o?a.createElement(U(),{style:{marginTop:"2px"}}):a.createElement(G(),null),onClick:function(){c(n)}}))),a.createElement(j(),{style:{color:l,margin:"0px",textAlign:"center",fontSize:"12px",padding:"8px"}},"Splunk AI Assistant is under development and actively improving responses based on your feedback."))};function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==te(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===te(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae,ce,ie=k.default.div(V||(ae=["\n margin-right: 12px;\n display: flex;\n min-width: 36px;\n min-height: 36px;\n max-width: 36px;\n max-height: 36px;\n border-radius: 18px;\n"],ce||(ce=ae.slice(0)),V=Object.freeze(Object.defineProperties(ae,{raw:{value:Object.freeze(ce)}})))),le=function(e){var t=e.style,n=e.config;return a.createElement(ie,{style:re(re({},t),{},{backgroundColor:n.backgroundColor})},a.createElement("div",{style:{color:"#FFFFFF",fontSize:"10px",margin:"auto"}},a.createElement("img",{src:n.svg,alt:n.description})))},ue=n(61801),se=n.n(ue),fe=n(50272),me=n.n(fe),pe=n(94345),he=n.n(pe),de=n(21435);function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ge(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==ye(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ye(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ye(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var we={cursor:"pointer",width:"16px",height:"16px"},ke=function(e){var t,n,r=e.style,o=e.resourceLinks,c=e.setScrollToBottom,i=(0,$.useSplunkTheme)().gray98,l=(t=(0,a.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1],f=(0,a.useCallback)((function(){s((function(e){return!e})),setTimeout((function(){c&&c()}),5)}),[c,s]);return a.createElement(A,{style:ve(ve({},r),{},{backgroundColor:i,alignSelf:u?"initial":"flex-start",borderRadius:"8px",padding:"8px 12px"})},a.createElement(_,{style:{flexGrow:0}},a.createElement(de.Typography,{variant:u?"title6":"body",style:{cursor:"pointer",margin:"0px"},onClick:f},u?a.createElement(me(),{style:ve(ve({},we),{},{marginTop:"-2px",marginRight:"2px"}),onClick:f}):a.createElement(he(),{style:ve(ve({},we),{},{marginTop:"-2px",marginRight:"2px"}),onClick:f}),"Related documentation"),u&&a.createElement(se(),{onClick:f,style:ve(ve({},we),{},{marginLeft:"auto",marginTop:"2px"})})),a.createElement(A,null,u&&void 0!==o&&o.length>0&&a.createElement(A,{style:{padding:"2px 24px 12px 24px"}},o.map((function(e){return a.createElement(D(),{style:{fontSize:"12px"},openInNewContext:!0,to:e.href}," • "+e.description)})))))},xe=n(28537),Oe=n.n(xe),Ee=n(29238),je=[{"search command":"abstract",url:"/Documentation/SplunkCloud/latest/SearchReference/Abstract"},{"search command":"accum",url:"/Documentation/SplunkCloud/latest/SearchReference/Accum"},{"search command":"addcoltotals",url:"/Documentation/SplunkCloud/latest/SearchReference/Addcoltotals"},{"search command":"addinfo",url:"/Documentation/SplunkCloud/latest/SearchReference/Addinfo"},{"search command":"addtotals",url:"/Documentation/SplunkCloud/latest/SearchReference/Addtotals"},{"search command":"analyzefields",url:"/Documentation/SplunkCloud/latest/SearchReference/Analyzefields"},{"search command":"anomalies",url:"/Documentation/SplunkCloud/latest/SearchReference/Anomalies"},{"search command":"anomalousvalue",url:"/Documentation/SplunkCloud/latest/SearchReference/Anomalousvalue"},{"search command":"anomalydetection",url:"/Documentation/SplunkCloud/latest/SearchReference/Anomalydetection"},{"search command":"append",url:"/Documentation/SplunkCloud/latest/SearchReference/Append"},{"search command":"appendcols",url:"/Documentation/SplunkCloud/latest/SearchReference/Appendcols"},{"search command":"appendpipe",url:"/Documentation/SplunkCloud/latest/SearchReference/Appendpipe"},{"search command":"arules",url:"/Documentation/SplunkCloud/latest/SearchReference/Arules"},{"search command":"associate",url:"/Documentation/SplunkCloud/latest/SearchReference/Associate"},{"search command":"autoregress",url:"/Documentation/SplunkCloud/latest/SearchReference/Autoregress"},{"search command":"awssnsalert",url:"/Documentation/SplunkCloud/latest/SearchReference/awssnsalert"},{"search command":"bin",url:"/Documentation/SplunkCloud/latest/SearchReference/Bin"},{"search command":"bucket",url:"/Documentation/SplunkCloud/latest/SearchReference/Bucket"},{"search command":"bucketdir",url:"/Documentation/SplunkCloud/latest/SearchReference/Bucketdir"},{"search command":"chart",url:"/Documentation/SplunkCloud/latest/SearchReference/Chart"},{"search command":"cluster",url:"/Documentation/SplunkCloud/latest/SearchReference/Cluster"},{"search command":"cofilter",url:"/Documentation/SplunkCloud/latest/SearchReference/Cofilter"},{"search command":"collect",url:"/Documentation/SplunkCloud/latest/SearchReference/Collect"},{"search command":"concurrency",url:"/Documentation/SplunkCloud/latest/SearchReference/Concurrency"},{"search command":"contingency",url:"/Documentation/SplunkCloud/latest/SearchReference/Contingency"},{"search command":"convert",url:"/Documentation/SplunkCloud/latest/SearchReference/Convert"},{"search command":"correlate",url:"/Documentation/SplunkCloud/latest/SearchReference/Correlate"},{"search command":"ctable",url:"/Documentation/SplunkCloud/latest/SearchReference/Ctable"},{"search command":"datamodel",url:"/Documentation/SplunkCloud/latest/SearchReference/Datamodel"},{"search command":"datamodelsimple",url:"/Documentation/SplunkCloud/latest/SearchReference/datamodelsimple"},{"search command":"dbinspect",url:"/Documentation/SplunkCloud/latest/SearchReference/Dbinspect"},{"search command":"dbxquery",url:"/Documentation/SplunkCloud/latest/SearchReference/dbxquery"},{"search command":"dedup",url:"/Documentation/SplunkCloud/latest/SearchReference/Dedup"},{"search command":"delete",url:"/Documentation/SplunkCloud/latest/SearchReference/Delete"},{"search command":"delta",url:"/Documentation/SplunkCloud/latest/SearchReference/Delta"},{"search command":"diff",url:"/Documentation/SplunkCloud/latest/SearchReference/Diff"},{"search command":"entitymerge",url:"/Documentation/SplunkCloud/latest/SearchReference/Entitymerge"},{"search command":"erex",url:"/Documentation/SplunkCloud/latest/SearchReference/Erex"},{"search command":"eval",url:"/Documentation/SplunkCloud/9.0.2303/SearchReference/Eval"},{"search command":"eventcount",url:"/Documentation/SplunkCloud/latest/SearchReference/Eventcount"},{"search command":"eventstats",url:"/Documentation/SplunkCloud/latest/SearchReference/Eventstats"},{"search command":"extract",url:"/Documentation/SplunkCloud/latest/SearchReference/Extract"},{"search command":"fieldformat",url:"/Documentation/SplunkCloud/latest/SearchReference/Fieldformat"},{"search command":"fields",url:"/Documentation/SplunkCloud/latest/SearchReference/Fields"},{"search command":"fieldsummary",url:"/Documentation/SplunkCloud/latest/SearchReference/Fieldsummary"},{"search command":"filldown",url:"/Documentation/SplunkCloud/latest/SearchReference/Filldown"},{"search command":"fillnull",url:"/Documentation/SplunkCloud/latest/SearchReference/Fillnull"},{"search command":"findtypes",url:"/Documentation/SplunkCloud/latest/SearchReference/Findtypes"},{"search command":"folderize",url:"/Documentation/SplunkCloud/latest/SearchReference/Folderize"},{"search command":"foreach",url:"/Documentation/SplunkCloud/latest/SearchReference/Foreach"},{"search command":"format",url:"/Documentation/SplunkCloud/latest/SearchReference/Format"},{"search command":"from",url:"/Documentation/SplunkCloud/latest/SearchReference/From"},{"search command":"fromjson",url:"/Documentation/SplunkCloud/latest/SearchReference/Fromjson"},{"search command":"gauge",url:"/Documentation/SplunkCloud/latest/SearchReference/Gauge"},{"search command":"gentimes",url:"/Documentation/SplunkCloud/latest/SearchReference/Gentimes"},{"search command":"geom",url:"/Documentation/SplunkCloud/latest/SearchReference/Geom"},{"search command":"geomfilter",url:"/Documentation/SplunkCloud/latest/SearchReference/Geomfilter"},{"search command":"geostats",url:"/Documentation/SplunkCloud/latest/SearchReference/Geostats"},{"search command":"head",url:"/Documentation/SplunkCloud/latest/SearchReference/Head"},{"search command":"highlight",url:"/Documentation/SplunkCloud/latest/SearchReference/Highlight"},{"search command":"history",url:"/Documentation/SplunkCloud/latest/SearchReference/History"},{"search command":"iconify",url:"/Documentation/SplunkCloud/latest/SearchReference/Iconify"},{"search command":"inputcsv",url:"/Documentation/SplunkCloud/latest/SearchReference/Inputcsv"},{"search command":"inputintelligence",url:"/Documentation/SplunkCloud/latest/SearchReference/Inputintelligence"},{"search command":"inputlookup",url:"/Documentation/SplunkCloud/latest/SearchReference/Inputlookup"},{"search command":"iplocation",url:"/Documentation/SplunkCloud/latest/SearchReference/Iplocation"},{"search command":"join",url:"/Documentation/SplunkCloud/latest/SearchReference/Join"},{"search command":"kmeans",url:"/Documentation/SplunkCloud/latest/SearchReference/Kmeans"},{"search command":"kvform",url:"/Documentation/SplunkCloud/latest/SearchReference/Kvform"},{"search command":"loadjob",url:"/Documentation/SplunkCloud/latest/SearchReference/Loadjob"},{"search command":"localize",url:"/Documentation/SplunkCloud/latest/SearchReference/Localize"},{"search command":"localop",url:"/Documentation/SplunkCloud/latest/SearchReference/Localop"},{"search command":"lookup",url:"/Documentation/SplunkCloud/latest/SearchReference/Lookup"},{"search command":"makecontinuous",url:"/Documentation/SplunkCloud/latest/SearchReference/Makecontinuous"},{"search command":"makemv",url:"/Documentation/SplunkCloud/latest/SearchReference/Makemv"},{"search command":"makeresults",url:"/Documentation/SplunkCloud/latest/SearchReference/Makeresults"},{"search command":"map",url:"/Documentation/SplunkCloud/latest/SearchReference/Map"},{"search command":"mcollect",url:"/Documentation/SplunkCloud/latest/SearchReference/Mcollect"},{"search command":"metadata",url:"/Documentation/SplunkCloud/latest/SearchReference/Metadata"},{"search command":"metasearch",url:"/Documentation/SplunkCloud/latest/SearchReference/Metasearch"},{"search command":"meventcollect",url:"/Documentation/SplunkCloud/latest/SearchReference/Meventcollect"},{"search command":"mpreview",url:"/Documentation/SplunkCloud/latest/SearchReference/Mpreview"},{"search command":"msearch",url:"/Documentation/SplunkCloud/latest/SearchReference/Msearch"},{"search command":"mstats",url:"/Documentation/SplunkCloud/latest/SearchReference/Mstats"},{"search command":"multikv",url:"/Documentation/SplunkCloud/latest/SearchReference/Multikv"},{"search command":"multisearch",url:"/Documentation/SplunkCloud/latest/SearchReference/Multisearch"},{"search command":"mvcombine",url:"/Documentation/SplunkCloud/latest/SearchReference/Mvcombine"},{"search command":"mvexpand",url:"/Documentation/SplunkCloud/latest/SearchReference/Mvexpand"},{"search command":"nomv",url:"/Documentation/SplunkCloud/latest/SearchReference/Nomv"},{"search command":"outlier",url:"/Documentation/SplunkCloud/latest/SearchReference/Outlier"},{"search command":"outputcsv",url:"/Documentation/SplunkCloud/latest/SearchReference/Outputcsv"},{"search command":"outputlookup",url:"/Documentation/SplunkCloud/latest/SearchReference/Outputlookup"},{"search command":"outputtext",url:"/Documentation/SplunkCloud/latest/SearchReference/Outputtext"},{"search command":"overlap",url:"/Documentation/SplunkCloud/latest/SearchReference/Overlap"},{"search command":"pivot",url:"/Documentation/SplunkCloud/latest/SearchReference/Pivot"},{"search command":"predict",url:"/Documentation/SplunkCloud/latest/SearchReference/Predict"},{"search command":"rangemap",url:"/Documentation/SplunkCloud/latest/SearchReference/Rangemap"},{"search command":"rare",url:"/Documentation/SplunkCloud/latest/SearchReference/Rare"},{"search command":"regex",url:"/Documentation/SplunkCloud/latest/SearchReference/Regex"},{"search command":"reltime",url:"/Documentation/SplunkCloud/latest/SearchReference/Reltime"},{"search command":"rename",url:"/Documentation/SplunkCloud/latest/SearchReference/Rename"},{"search command":"replace",url:"/Documentation/SplunkCloud/latest/SearchReference/Replace"},{"search command":"require",url:"/Documentation/SplunkCloud/latest/SearchReference/Require"},{"search command":"rest",url:"/Documentation/SplunkCloud/latest/SearchReference/Rest"},{"search command":"return",url:"/Documentation/SplunkCloud/latest/SearchReference/Return"},{"search command":"reverse",url:"/Documentation/SplunkCloud/latest/SearchReference/Reverse"},{"search command":"rex",url:"/Documentation/SplunkCloud/latest/SearchReference/Rex"},{"search command":"rtorder",url:"/Documentation/SplunkCloud/latest/SearchReference/Rtorder"},{"search command":"run",url:"/Documentation/SplunkCloud/latest/SearchReference/Run"},{"search command":"savedsearch",url:"/Documentation/SplunkCloud/latest/SearchReference/Savedsearch"},{"search command":"script",url:"/Documentation/SplunkCloud/latest/SearchReference/Script"},{"search command":"scrub",url:"/Documentation/SplunkCloud/latest/SearchReference/Scrub"},{"search command":"search",url:"/Documentation/SplunkCloud/latest/SearchReference/Search"},{"search command":"searchtxn",url:"/Documentation/SplunkCloud/latest/SearchReference/Searchtxn"},{"search command":"selfjoin",url:"/Documentation/SplunkCloud/latest/SearchReference/Selfjoin"},{"search command":"sendalert",url:"/Documentation/SplunkCloud/latest/SearchReference/Sendalert"},{"search command":"sendemail",url:"/Documentation/SplunkCloud/latest/SearchReference/Sendemail"},{"search command":"set",url:"/Documentation/SplunkCloud/latest/SearchReference/Set"},{"search command":"setfields",url:"/Documentation/SplunkCloud/latest/SearchReference/Setfields"},{"search command":"sichart",url:"/Documentation/SplunkCloud/latest/SearchReference/Sichart"},{"search command":"sirare",url:"/Documentation/SplunkCloud/latest/SearchReference/Sirare"},{"search command":"sistats",url:"/Documentation/SplunkCloud/latest/SearchReference/Sistats"},{"search command":"sitimechart",url:"/Documentation/SplunkCloud/latest/SearchReference/Sitimechart"},{"search command":"sitop",url:"/Documentation/SplunkCloud/latest/SearchReference/Sitop"},{"search command":"snowincident",url:"/Documentation/SplunkCloud/latest/SearchReference/snowincident"},{"search command":"snowincidentstream",url:"/Documentation/SplunkCloud/latest/SearchReference/snowincidentstream"},{"search command":"snowevent",url:"/Documentation/SplunkCloud/latest/SearchReference/snowevent"},{"search command":"snoweventstream",url:"/Documentation/SplunkCloud/latest/SearchReference/snoweventstream"},{"search command":"sort",url:"/Documentation/SplunkCloud/latest/SearchReference/Sort"},{"search command":"spath",url:"/Documentation/SplunkCloud/latest/SearchReference/Spath"},{"search command":"stats",url:"/Documentation/SplunkCloud/latest/SearchReference/Stats"},{"search command":"strcat",url:"/Documentation/SplunkCloud/latest/SearchReference/Strcat"},{"search command":"streamstats",url:"/Documentation/SplunkCloud/latest/SearchReference/Streamstats"},{"search command":"table",url:"/Documentation/SplunkCloud/9.0.2303/SearchReference/Table"},{"search command":"tags",url:"/Documentation/SplunkCloud/latest/SearchReference/Tags"},{"search command":"tail",url:"/Documentation/SplunkCloud/latest/SearchReference/Tail"},{"search command":"timechart",url:"/Documentation/SplunkCloud/latest/SearchReference/Timechart"},{"search command":"timewrap",url:"/Documentation/SplunkCloud/latest/SearchReference/Timewrap"},{"search command":"tojson",url:"/Documentation/SplunkCloud/latest/SearchReference/Tojson"},{"search command":"top",url:"/Documentation/SplunkCloud/latest/SearchReference/Top"},{"search command":"transaction",url:"/Documentation/SplunkCloud/latest/SearchReference/Transaction"},{"search command":"transpose",url:"/Documentation/SplunkCloud/latest/SearchReference/Transpose"},{"search command":"trendline",url:"/Documentation/SplunkCloud/latest/SearchReference/Trendline"},{"search command":"tscollect",url:"/Documentation/SplunkCloud/latest/SearchReference/Tscollect"},{"search command":"tstats",url:"/Documentation/SplunkCloud/latest/SearchReference/Tstats"},{"search command":"typeahead",url:"/Documentation/SplunkCloud/latest/SearchReference/Typeahead"},{"search command":"typelearner",url:"/Documentation/SplunkCloud/latest/SearchReference/Typelearner"},{"search command":"typer",url:"/Documentation/SplunkCloud/latest/SearchReference/Typer"},{"search command":"union",url:"/Documentation/SplunkCloud/latest/SearchReference/Union"},{"search command":"uniq",url:"/Documentation/SplunkCloud/latest/SearchReference/Uniq"},{"search command":"untable",url:"/Documentation/SplunkCloud/latest/SearchReference/Untable"},{"search command":"walklex",url:"/Documentation/SplunkCloud/latest/SearchReference/Walklex"},{"search command":"where",url:"/Documentation/SplunkCloud/latest/SearchReference/Where"},{"search command":"x11",url:"/Documentation/SplunkCloud/latest/SearchReference/X11"},{"search command":"xmlkv",url:"/Documentation/SplunkCloud/latest/SearchReference/Xmlkv"},{"search command":"xmlunescape",url:"/Documentation/SplunkCloud/latest/SearchReference/Xmlunescape"},{"search command":"xpath",url:"/Documentation/SplunkCloud/latest/SearchReference/Xpath"},{"search command":"xyseries",url:"/Documentation/SplunkCloud/latest/SearchReference/Xyseries"}],Ce={};je.forEach((function(e){Ce[e["search command"]]=1}));var De=n(97212),Pe=n(2411);function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function Le(){Le=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof m?t:m,c=Object.create(a.prototype),i=new E(o||[]);return r(c,"_invoke",{value:w(e,n,i)}),c}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function m(){}function p(){}function h(){}var d={};l(d,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&n.call(b,a)&&(d=b);var v=h.prototype=m.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function o(r,a,c,i){var l=s(e[r],e,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Re(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,i)}),(function(e){o("throw",e,c,i)})):t.resolve(f).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,i)}))}i(l.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var i=k(c,n);if(i){if(i===f)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=h,r(v,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var c=new S(u(t,n,r,o),a);return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(v),l(v,i,"Generator"),l(v,a,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=j,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return c.type="throw",c.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=e,c.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Te(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}var Ie=/[.?!,]+$/;function Ae(){var e;return e=Le().mark((function e(t){var n,r;return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!0,!navigator.clipboard||!window.isSecureContext){e.next=6;break}return e.next=4,navigator.clipboard.writeText(t);case 4:e.next=13;break;case 6:(r=document.createElement("textarea")).value=t,r.style.position="absolute",r.style.left="-999999px",document.body.prepend(r),r.select();try{document.execCommand("copy")}catch(e){console.error(e),n=!1}finally{r.remove()}case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e)})),Ae=function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){Te(a,r,o,c,i,"next",e)}function i(e){Te(a,r,o,c,i,"throw",e)}c(void 0)}))},Ae.apply(this,arguments)}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e){return e?e.replace(/['`]([^'\\]*(?:\\.[^'\\]*)*)['`]/g,"<span>$1</span>"):e}var Be=/^`+|`+$/g;function Me(e){var t=[],n=void 0;e&&e.startsWith("-")?t=function(e){var t,n=[],r=[],o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}(e);try{for(o.s();!(t=o.n()).done;){var a=t.value,c=a.match(/^\s*/)[0].length/2,i={text:a.trim().replace(/^-+\s*/,""),children:[]};0===c?n.push(i):r[c-1].children.push(i),r[c]=i}}catch(e){o.e(e)}finally{o.f()}return n}(e.split("\n")):n=e;var r=t.reduce((function(e,t){return e&&t.text.startsWith("`")}),!0);return r&&(t=t.map((function(e){var t=e.text.match(/`(.*?)`: (.*)/);if(t){var n=t[1],r=t[2];return{block:n.trim(),summary:r.trim()}}return{block:e.text.trim()}}))),{points:t,spl:n,startsWithCodeBlock:r}}var Ge,Ne,ze=n(75075),qe=n.n(ze),Ue=n(27370),We=n.n(Ue),He=n(78119),$e=n.n(He);function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ze(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ze(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ke=k.default.div(Ge||(Ge=Qe(["\n background-color: ",";\n border-radius: 10px;\n align-self: center;\n border: 1px solid ",";\n"])),$.variables.gray96,$.variables.borderColor),Ve=k.default.p(Ne||(Ne=Qe(['\n font-family: "Splunk Data Mono", "IBM Plex Mono", Courier, monospace;\n font-size: 14px;\n line-height: 2;\n color: ',";\n margin: 0;\n"])),$.variables.black),et=function(e){var t=e.cardStyle,n=e.style,r=e.id,o=e.spl,c=e.openInSearch,i=e.disableCopy,l=(0,$.useSplunkTheme)(),u=l.borderColor,s=l.syntaxBlue,f=(0,a.useCallback)((function(){c&&c(o)}),[o,c]),m=(0,a.useCallback)((function(){(function(e){return Ae.apply(this,arguments)})(o).then((function(e){}))}),[o]),p=(0,a.useMemo)((function(){return function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#3366F3",n=e.trim().replace(Ie,""),r=[],o=0;o<n.length;o++)"|"===n[o]&&r.push(o);var a=[],c=0;r.forEach((function(e){0!==e&&(a.push({start:c,end:e-1}),c=e)})),a.push({start:c,end:n.length});var i="";return a.forEach((function(e,r){var o=n.substring(e.start,e.end);c=0;for(var a=0;a<o.length;a++)if(" =()".includes(o[a])||a===o.length-1){var l=a===o.length-1?a+1:a,u=o.substring(c,l);if(1===Ce[u]){var s='<span style="color:'.concat(t,'">').concat(u,"</span>"),f=o.substring(0,c)+s+o.substring(l,o.length);o=f,a=c+s.length,c=a+1}else c=a+1}""!==o&&(i+=o,i+="<br/>")})),(0,Ee.sanitize)(i)}(o,s)}),[o]);return a.createElement(Ke,{id:r,style:Ye({},t)},a.createElement(A,{style:Ye({padding:"12px"},n)},a.createElement(Ve,{dangerouslySetInnerHTML:{__html:p}}),(c||!i)&&a.createElement(a.Fragment,null,a.createElement($e(),{style:{height:"0px",border:"1px solid ".concat(u),marginTop:"8px",marginBottom:"12px"}}),a.createElement(_,{style:{marginLeft:"auto",flexGrow:0}},!i&&a.createElement(H(),{appearance:"pill",style:{flexGrow:0},onClick:m},a.createElement(We(),null),"   Copy"),c&&a.createElement(H(),{appearance:"pill",style:{flexGrow:0},onClick:f},a.createElement(qe(),null),"   Open in search")))))},tt=n(76928),nt=n.n(tt),rt=n(26777),ot=n.n(rt);function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==at(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===at(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var st,ft=function(e){var t=e.submitted,n=e.target,r=e.onClick,o=1===n?nt():ot();return a.createElement(H(),{icon:a.createElement(o,{screenReaderText:null,variant:t===n?"filled":"outlined",style:{color:t===n?"#3993FF":void 0}}),onClick:function(){r(t===n?0:n)},appearance:"pill",style:{maxWidth:"32px"}})},mt=function(e){var t,n,r,o=e.style,c=e.entry,i=e.sendFeedback,l=(n=(0,a.useState)(null!==(t=null==c?void 0:c.feedback)&&void 0!==t?t:0),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1],f=(0,a.useCallback)((function(e){0!==e&&(i&&(c.feedback=1===e,i(c.prompt,c.content+": "+c.explain,1===e)),s(e))}),[c,i,s]);return a.createElement(_,{style:it({},o)},a.createElement(ft,{submitted:u,target:1,onClick:f}),a.createElement(ft,{submitted:u,target:2,onClick:f}))},pt=n(75401),ht=n.n(pt),dt=n(29315),yt={description:"user",backgroundColor:"#555555",svg:n.n(dt)()},bt={description:"bot",backgroundColor:"#D015B2",svg:ht()};function vt(e){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)}function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){wt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==vt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===vt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xt=k.default.div(st||(st=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n p {\n font-size: 14px;\n }\n span {\n font-family: Splunk Data Mono, IBM Plex Mono, Courier, monospace; \n font-size: 14px; \n line-height: 2; \n background-color: ",";\n }\n"])),$.variables.gray96),Ot=function e(t,n){return a.createElement(xt,null,a.createElement(j(),{style:{marginLeft:"".concat(n,"px"),marginTop:"8px"},dangerouslySetInnerHTML:{__html:" • "+Fe(t.text)}}),t.children&&t.children.map((function(t){return e(t,n+16)})))},Et=function(e){var t,n,r=e.style,o=e.explanation,c=e.setScrollToBottom,i=((0,$.useSplunkTheme)().linkColor,t=(0,a.useState)(!0),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],u=i[1];return(0,a.useCallback)((function(){u((function(e){return!e})),setTimeout((function(){c&&c()}),5)}),[c,u]),a.createElement(A,{style:St(St({},r),{},{alignSelf:l?"initial":"flex-start",paddingTop:"12px"})},a.createElement(_,{style:{flexGrow:0}},a.createElement(de.Typography,{variant:"title6"},"SPL command details")),l&&o&&a.createElement(A,{style:{paddingTop:"12px"}},o.spl&&a.createElement(j(),null,o.spl),o.points&&o.points.map((function(e){return a.createElement(A,null,o.startsWithCodeBlock?function(e){return a.createElement(xt,null,a.createElement(et,{cardStyle:{width:"100%"},style:{padding:"4px 8px"},spl:e.block,openInSearch:!1,disableCopy:!0}),e.summary&&a.createElement(j(),{style:{marginTop:"6px",marginBottom:"12px"},dangerouslySetInnerHTML:{__html:Fe(e.summary)}}))}(e):Ot(e,0))}))))};function jt(e){if(!e)return[];var t=[],n=e.split(/\s+/);return je.forEach((function(e){n.includes(e["search command"])&&t.push({href:"https://docs.splunk.com"+e.url,description:e["search command"]+" - Splunk documentation"})})),t}n(51008);var Ct,Dt,Pt,Rt=n(48689),Lt=n.n(Rt);function Tt(e){return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tt(e)}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){_t(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Tt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Tt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Mt=k.default.div(Ct||(Ct=Bt(["\n margin-right: auto;\n max-width: 100%;\n border-radius: 8px;\n width: 100%;\n align-self: center;\n padding: 12px;\n box-sizing: border-box;\n"]))),Gt=function(e){var t=e.onClick,n=e.style,r=e.children;return a.createElement(Mt,{onClick:t,style:n},r)},Nt=(0,k.keyframes)(Dt||(Dt=Bt(["\n from {transform:rotate(0deg);}\n to {transform:rotate(359deg);}\n"]))),zt=(0,k.default)(z())(Pt||(Pt=Bt(["\n animation-name: ",";\n animation-duration: 4s;\n animation-iteration-count: infinite;\n height: 20px;\n width: 20px;\n"])),Nt),qt=function(e){var t,n,r,o,c=e.style,i=e.historyEntry,l=e.requestExplain,u=e.openInSearch,s=e.feedbackEnabled,f=e.sendFeedback,m=e.setScrollToBottom,p=(0,$.useSplunkTheme)(),h=p.backgroundColor,d=p.linkColor,y=(n="```",-1===(t=i.content).indexOf(n)||t.lastIndexOf(n)===t.indexOf(n)?{splBlock:t}:{beforeBlock:t.substring(0,t.indexOf(n)),splBlock:t.substring(t.indexOf(n)+3,t.lastIndexOf(n)),afterBlock:t.substring(t.lastIndexOf(n)+3,t.length)}),b=function(e){var t=e.split("\n"),n=[];return t.forEach((function(e){"anomalydetection [method] [action] [pthresh] [cutoff] [field-list]"===e?n.push({text:e,format:"code"}):n.push({text:e,format:"text"})})),n}(i.content),v=(0,a.useCallback)((function(){m(i.id,1)}),[i,m]),g=i.resourceLinks,S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t||e;try{var r=n.split("Concise Summary:"),o=r[1].split("Detailed Explanation:");return{spl:(t?e:r[0]).trim().replace(Be,""),summary:o[0].trim(),explanation:o[1].trim()}}catch(e){return{}}}(i.content,i.explain),w="user"===i.type?yt:bt,k=void 0,x=void 0,O=void 0,E=(r=(0,a.useState)(!1),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(r,o)||function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=E[0],P=E[1];return i.isLoading?(x={backgroundColor:h},k=a.createElement(_,null,a.createElement(zt,{color:"#909090"})," ",a.createElement(j(),{style:{marginLeft:"8px",marginBottom:"0px"}},"Generating response"))):"copilot"===i.type?(x={backgroundColor:h},S.spl||S.summary||S.explanation?(g=jt(S.spl),k=a.createElement(a.Fragment,null,S.spl&&a.createElement(et,{cardStyle:{marginTop:"0px",marginBottom:"12px"},id:i.id,spl:S.spl,openInSearch:u}),S.summary&&a.createElement(j(),{style:{marginTop:"0px",marginBottom:"4px"}},S.summary),S.explanation&&a.createElement(Et,{explanation:Me(S.explanation),setScrollToBottom:v}),s&&a.createElement(mt,{entry:i,sendFeedback:f}))):k="docs"===i.queryType?a.createElement(a.Fragment,null,b.map((function(e){return e.text.startsWith("For more details: ")||e.text.startsWith("It might be worth checking: ")||e.text.startsWith("Information as of ")?void 0:"text"===e.format?a.createElement(j(),{style:{}},e.text.trim()):a.createElement(et,{id:i.id,spl:e.text,disableCopy:!0})}))):a.createElement(a.Fragment,null,y.beforeBlock&&a.createElement(j(),{style:{marginTop:"0px",marginBottom:"12px"}},y.beforeBlock),y.splBlock&&a.createElement(et,{cardStyle:{marginTop:"0px",marginBottom:"12px"},id:i.id,spl:y.splBlock,openInSearch:u}),y.afterBlock&&a.createElement(j(),{style:{marginTop:"0px",marginBottom:"8px"}},y.afterBlock),i.warnings&&i.warnings.length>0&&a.createElement(a.Fragment,null,i.warnings.map((function(e){return a.createElement(Lt(),{appearance:"fill",type:"warning",style:{marginTop:"0px",marginBottom:"8px"}},e)}))),C?a.createElement(_,null,a.createElement(zt,{color:"#909090"})," ",a.createElement(j(),{style:{marginLeft:"4px",marginBottom:"4px"}},"Loading explanations")):a.createElement(_,{style:{alignItems:"center",cursor:"pointer",marginBottom:"4px"},onClick:function(){P(!0),l(i.id,i.content)}},a.createElement(T(),{style:{marginRight:"4px",color:d}}),a.createElement(D(),{style:{fontSize:"14px",textDecoration:"none"}},"Explain SPL to me")),s&&a.createElement(mt,{entry:i,sendFeedback:f})),O=a.createElement(a.Fragment,null,g&&g.length>0&&a.createElement(ke,{style:{marginTop:"8px"},resourceLinks:g,setScrollToBottom:v}))):"user"===i.type?k=a.createElement(j(),{style:{margin:"0px"}},i.content):"error"===i.type&&(x={backgroundColor:h,border:"1px solid rgba(256, 0, 0, 1)",display:"flex",flexDirection:"row",alignItems:"center"},k=a.createElement(a.Fragment,null,a.createElement(Oe(),{style:{color:"red"}}),a.createElement(j(),{style:{marginLeft:"8px",marginTop:"0px",marginBottom:"0px"}},i.error instanceof Error?i.error.message:i.error))),a.createElement(_,{style:At({},c)},a.createElement(le,{style:{marginTop:"4px"},config:w}),a.createElement(A,{style:{width:"100%"}},a.createElement(Gt,{style:At({},x)},k),O))};function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){$t(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ut(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ut(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=e.style;return a.createElement(Lt(),{style:Ht({},t),appearance:"fill",type:"info"},"The Splunk AI Assistant requires the Python for Scientific Computing add-on. Install the correct version for your operating system:",a.createElement("br",null),a.createElement(D(),{to:"https://splunkbase.splunk.com/app/2882",openInNewContext:!0},"• Linux 64-bit"),a.createElement("br",null),a.createElement(D(),{to:"https://splunkbase.splunk.com/app/2881",openInNewContext:!0},"• Mac Intel"),a.createElement("br",null),a.createElement(D(),{to:"https://splunkbase.splunk.com/app/2883",openInNewContext:!0},"• Windows 64-bit"))}var Xt=n(26303),Yt=n.n(Xt),Jt=n(28482),Qt=n.n(Jt);function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(e)}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Kt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Kt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nn=function(e){var t=e.onClick,n=e.prompt,r=(0,$.useSplunkTheme)().gray92;return a.createElement(Gt,{onClick:t,style:{borderRadius:"4px",padding:"8px",marginTop:"12px",cursor:"pointer",backgroundColor:r}},a.createElement(j(),{style:{marginBottom:0}},n))},rn=function(e){var t=e.style,n=e.promptTabs,r=e.initialTab,o=e.onClick,c=(0,$.useSplunkTheme)().infoColor;return a.createElement(Yt(),{defaultActivePanelId:r,iconSize:"inline",style:en({},t)},n.map((function(e){return a.createElement(Yt().Panel,{label:e.label,panelId:e.id},a.createElement(A,null,"explain"===e.id&&a.createElement(de.Typography,{style:{marginTop:"8px",marginBottom:"0px"}},a.createElement(Qt(),{variant:"filled",style:{color:c,marginTop:"-2px",marginRight:"4px"}}),"Copy and paste an SPL query to review an explanation of that query"),e.prompts.map((function(e){return a.createElement(nn,{onClick:function(){o(e)},prompt:e})}))))})))};function on(e,t){for(var n=e.slice(),r=[],o=n.length-1;o>=0;o--){var a=Math.floor(Math.random()*(o+1)),c=[n[a],n[o]];n[o]=c[0],n[a]=c[1]}for(var i=0;i<t;i++)r.push(n[i]);return r}var an,cn=["Using data models, get top 10 users with the most failed login attempts over the past week","Look for Windows security events for failed logins (any logon type) by user and output time, host, and signature"],ln=['index=_audit action=search info=granted search=* NOT "search_id=scheduler" NOT "search=|history" NOT "user=splunk-system-user" NOT "search=typeahead" NOT "search=| metadata type=* | search totalCount>0" | stats count by user search _time | sort _time | convert ctime(_time) | stats list(_time) as time list(search) as search by user',"| rest splunk_server=local /services/cluster/master/peers | stats sum(bucket_count) by label | rename label as peer"];function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(n),!0).forEach((function(t){mn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==un(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===un(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dn=(0,k.default)(A)(an||(an=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n overflow: scroll;\n width: 100%;\n scrollbar-color: #0B0C0E #00000000;\n flex-grow: 1;\n"]))),yn=function(e){var t=e.style,n=e.goToAbout,r=e.runQuery,o=e.openInSearch,c=e.feedbackEnabled,i=e.sendFeedback,l=e.isMissingPrereq,u=e.chatHistory,s=e.setChatHistory,f=pn((0,a.useState)(""),2),m=f[0],p=f[1],h=pn((0,a.useState)(!1),2),d=h[0],y=h[1],b=(0,a.useRef)(null),v=(0,a.useMemo)((function(){return[{id:"write",label:"Write SPL",prompts:on(cn,2)},{id:"explain",label:"Explain SPL",prompts:on(ln,2)}]}),[]),g=(0,a.useCallback)((function(e,t){s((function(n){return n.push({id:e,isLoading:!1,type:"user",content:t}),n.filter((function(e,t){return e.id===t}))}))}),[s]),S=(0,a.useCallback)((function(e,t){s((function(n){return n.push({id:e,prompt:t,isLoading:!0,type:"copilot",content:""}),n.filter((function(e,t){return e.id===t}))}))}),[s]),w=(0,a.useCallback)((function(e,t,n,r){s((function(o){var a=o.findIndex((function(t){return t.id===e})),c=o[a];return o[a]=fn(fn({},c),{},{content:t,warnings:r,resourceLinks:n,isLoading:!1}),o.filter((function(e,t){return e.id===t}))}))}),[s]),k=(0,a.useCallback)((function(e,t){s((function(n){var r=n.findIndex((function(t){return t.id===e})),o=n[r];return n[r]=fn(fn({},o),{},{explain:t,isLoading:!1}),n.filter((function(e,t){return e.id===t}))}))}),[s]),x=(0,a.useCallback)((function(e,t){s((function(n){var r=n.findIndex((function(t){return t.id===e})),o=n[r];return n[r]=fn(fn({},o),{},{error:t,type:"error",isLoading:!1}),n.filter((function(e,t){return e.id===t}))}))}),[s]),O=(0,a.useCallback)((function(e,t){s((function(n){var r=n.findIndex((function(t){return t.id===e})),o=n[r];return n[r]=fn(fn({},o),{},{queryType:t}),n}))}),[s]),E=(0,a.useCallback)((function(e,t){0!==t&&e!==u.length-1||null!=b&&b.current&&(null==b||b.current.scrollIntoView({behavior:"smooth",block:"end"}))}),[u,b]),C=(0,a.useCallback)((function(e){p("");var t=u.length;g(t,e),y(!0);var n=t+1;S(n,e),r(e).then((function(e){O(t,e.queryType),w(n,e.spl,e.resourceLinks,e.warnings),y(!1),E(n,0)})).catch((function(e){x(n,e),y(!1),E(n,0)})),setTimeout((function(){E(n,0)}),100)}),[u,S,g,w,x,O,y,E,r]),P=(0,a.useCallback)((function(e,t){r(t,!0).then((function(t){k(e,t.explain),y(!1),E(e,1)})).catch((function(t){x(e,t),y(!1),E(e,1)}))}),[]),R=(0,a.useCallback)((function(){s([])}),[u]),L=0===l,T=1===l,I=2===l||void 0===l,F=(0,$.useSplunkTheme)().white;return a.createElement(A,{style:fn({},t)},0===u.length&&a.createElement(a.Fragment,null,a.createElement(_,{style:{flexGrow:1,width:"100%"}},a.createElement(le,{style:{marginTop:"4px"},config:bt}),a.createElement(A,{style:{width:"100%"}},a.createElement(Gt,{style:{backgroundColor:F,marginBottom:"12px"}},a.createElement(j(),{style:{marginBottom:0}},"Hi, I am your Splunk AI Assistant. I can translate task descriptions into SPL queries, or explain SPL queries to you in plain English."),!(L||T)&&a.createElement(a.Fragment,null,a.createElement(j(),{style:{marginBottom:"0px"}},"First time user? View the ",a.createElement(D(),{onClick:n},"usage guidelines")," and try these sample prompts:"),a.createElement(rn,{promptTabs:v,initialTab:"write",onClick:C}))),L?a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},a.createElement(U(),{size:"medium"})):T&&a.createElement(Zt,null)))),I&&a.createElement(a.Fragment,null,0!==u.length&&a.createElement(dn,{id:"chat",style:{padding:"8px 24px 0px 8px",boxSizing:"border-box"}},u.map((function(e){return a.createElement(qt,{style:{margin:"6px 0px"},historyEntry:e,openInSearch:o,requestExplain:P,feedbackEnabled:c,sendFeedback:i,setScrollToBottom:E})})),a.createElement("div",{ref:b})),a.createElement(ee,{style:{flexGrow:0,marginTop:"8px"},query:m,setQuery:p,loading:d,triggerSearch:C,resetChat:R})))},bn=n(68580),vn=n.n(bn);function gn(e){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(e)}function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(n),!0).forEach((function(t){kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==gn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==gn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xn=function(e){var t=e.onClick,n=e.selected,r=e.icon,o=e.title,c=(0,$.useSplunkTheme)().interactiveColorPrimary;return a.createElement(_,{onClick:t,style:wn(wn({},n?{borderRight:"4px solid ".concat(c)}:{}),{},{cursor:"pointer",padding:"12px 8px",alignItems:"center"})},r,a.createElement(de.Typography,{weight:n?"bold":"normal",style:{margin:"0px 0px 0px 8px"}},o))},On=function(e){var t=e.about;return a.createElement(A,{style:{padding:"12px",marginTop:"auto"}},a.createElement(vn(),{level:4,style:{marginBottom:"12px"}},t.title),t.content)},En=function(e){var t=e.style,n=e.choices,r=e.selected,o=e.setSelected,c=e.about,i=(0,$.useSplunkTheme)().neutral200;return a.createElement(A,{style:wn(wn({},t),{},{height:"100%",boxSizing:"border-box",zIndex:1,borderRight:"1px solid ".concat(i)})},n.map((function(e){return a.createElement(xn,{key:e.key,onClick:function(){o(e.key)},icon:e.icon,title:e.title,selected:r===e.key})})),a.createElement(On,{about:c}))},jn=function(e){return e.style,a.createElement(A,null,a.createElement(vn(),{level:2},"Usage guidelines"),a.createElement(vn(),{level:3},"Consider the following when using the Splunk AI Assistant"),a.createElement(A,null,a.createElement(j(),{style:{marginBottom:"0px"}}," • For best results, use the app options as follows",a.createElement("br",null)),a.createElement(_,null,a.createElement(j(),{style:{marginBottom:"0px"}},"  • "),a.createElement(de.Typography,{variant:"title6"},"Write SPL feature"),a.createElement(j(),{style:{marginBottom:"0px"}},": In plain English, describe what you need the SPL to do with your data."),a.createElement("br",null)),a.createElement(_,null,a.createElement(j(),{style:{marginBottom:"0px"}},"  • "),a.createElement(de.Typography,{variant:"title6"},"Explain SPL feature"),a.createElement(j(),{style:{marginBottom:"0px"}},": Limit the query to SPL only. Minimize the inclusion of any wording that is not part of the SPL query you want to learn more about."),a.createElement("br",null))),a.createElement(j(),null," • Do not include any sensitive information in the Chat field.",a.createElement("br",null)," • The app is under active development. Chat-generated results might be limited or inaccurate.",a.createElement("br",null)," • Some queries generate one or more link to related Splunk documentation. Use these links to learn more about a topic."),a.createElement(vn(),{level:3},"Privacy"),a.createElement(j(),null,"You can opt in and opt out of sharing your data with Splunk. Change this setting on the Settings tab. If you opt out, no data associated with your use of this app is collected.",a.createElement("br",null),a.createElement("br",null),"If you opt-in and allow for data sharing, the app collects the following usage information:",a.createElement("br",null)," • Content of the query in the Chat field(s).",a.createElement("br",null)," • Results returned from the query.",a.createElement("br",null)," • User feedback on query results quality (thumbs up or down)."))},Cn=n(27885),Dn=n.n(Cn);function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function Rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rn(Object(n),!0).forEach((function(t){Tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Pn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Pn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In=function(e){var t=e.style,n=e.feedbackEnabled,r=e.updateFeedback;return a.createElement(A,{style:Ln({},t)},a.createElement(vn(),{level:2},"Settings"),a.createElement(vn(),{level:3},"Share data settings"),a.createElement(j(),null,'When Splunk AI Assistant is deployed on Splunk Enterprise, the Splunk platform sends aggregated usage data to Splunk Inc. ("Splunk") to help improve the app in future releases.'),a.createElement(Dn(),{selected:n,value:n,onClick:function(e,t){var n=t.value;r(!n)}},"Share my data with Splunk"))},An=n(51334);function _n(e){return _n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_n(e)}function Fn(){Fn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof m?t:m,c=Object.create(a.prototype),i=new E(o||[]);return r(c,"_invoke",{value:w(e,n,i)}),c}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function m(){}function p(){}function h(){}var d={};l(d,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&n.call(b,a)&&(d=b);var v=h.prototype=m.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function o(r,a,c,i){var l=s(e[r],e,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==_n(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,i)}),(function(e){o("throw",e,c,i)})):t.resolve(f).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,i)}))}i(l.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var i=k(c,n);if(i){if(i===f)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=h,r(v,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var c=new S(u(t,n,r,o),a);return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(v),l(v,i,"Generator"),l(v,a,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=j,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return c.type="throw",c.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=e,c.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Bn(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Mn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){Bn(a,r,o,c,i,"next",e)}function i(e){Bn(a,r,o,c,i,"throw",e)}c(void 0)}))}}function Gn(e){return Nn.apply(this,arguments)}function Nn(){return Nn=Mn(Fn().mark((function e(t){var n,r,o=arguments;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]&&o[1],r=new Promise((function(e,r){var o,a=An.Z.create({search:'| splgen prompt="'.concat((o=t,JSON.stringify(o).slice(1,-1)),'" explain=').concat(n),earliest_time:"-4h@h",latest_time:"now"},{app:Pe.app,owner:Pe.username});a.getProgress().subscribe({next:function(e){},error:function(e){r(e)},complete:function(){}}),a.getResults().subscribe((function(t){var o;if(null!=t&&null!==(o=t.results)&&void 0!==o&&o.length){var a=t.results[0],c=null==t?void 0:t.messages.filter((function(e){return"WARN"===e.type})).map((function(e){return e.text}));if(n)e({explain:a.EXPLAIN});else{var i=jt(a.SPL);e({spl:a.SPL,resourceLinks:i,warnings:c})}}else r("An error occured generating your response. Try again later.")}))})),e.next=4,r;case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)}))),Nn.apply(this,arguments)}function zn(){return(zn=Mn(Fn().mark((function e(){var t;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=An.Z.create({search:'| makeresults 1 | join type=left [| rest /services/apps/local splunk_server=local | search disabled=0 label="Python for Scientific Computing" | table version]\n | eval req=if(version>="4.0.0", 1, 0)'},{app:Pe.app,owner:Pe.username}),e.abrupt("return",new Promise((function(e,n){t.getResults().subscribe((function(t){try{e(parseInt(t.results[0].req)+1)}catch(e){n(1)}}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qn(){return qn=Mn(Fn().mark((function e(t,n,r,o){var a;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=An.Z.create({search:'| splgenfeedback sessionId="'.concat(t,'" prompt="').concat(n,'" response="').concat(r,'" correct=').concat(o),earliest_time:"-15m",latest_time:"now"},{app:Pe.app,owner:Pe.username}),e.abrupt("return",new Promise((function(e,t){a.getResults().subscribe((function(){e()}))})));case 2:case"end":return e.stop()}}),e)}))),qn.apply(this,arguments)}var Un=n(956),Wn=n(17673);function Hn(e){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hn(e)}function $n(){$n=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof m?t:m,c=Object.create(a.prototype),i=new E(o||[]);return r(c,"_invoke",{value:w(e,n,i)}),c}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function m(){}function p(){}function h(){}var d={};l(d,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&n.call(b,a)&&(d=b);var v=h.prototype=m.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function o(r,a,c,i){var l=s(e[r],e,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Hn(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,i)}),(function(e){o("throw",e,c,i)})):t.resolve(f).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,i)}))}i(l.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var i=k(c,n);if(i){if(i===f)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=s(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=h,r(v,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var c=new S(u(t,n,r,o),a);return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},g(v),l(v,i,"Generator"),l(v,a,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=j,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return c.type="throw",c.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=e,c.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zn(Object(n),!0).forEach((function(t){Yn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Hn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Hn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Qn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){Jn(a,r,o,c,i,"next",e)}function i(e){Jn(a,r,o,c,i,"throw",e)}c(void 0)}))}}var Kn="configs/conf-splunkaiassistant/splunk_ai_assistant";function Vn(){return(Vn=Qn($n().mark((function e(t){var n,r,o;return $n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,De.createRESTURL)(Kn,{app:Pe.app,owner:"nobody"}),e.next=3,fetch(n+"?output_mode=json",Xn({},Un.pX));case 3:return r=e.sent,e.next=6,r.json();case 6:return o=e.sent,e.abrupt("return",o.entry[0].content[t]);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function er(){return(er=Qn($n().mark((function e(t,n){var r,o;return $n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,De.createRESTURL)(Kn,{app:Pe.app,owner:"nobody"}),(o={})[t]=n,e.prev=3,e.next=6,fetch(r,Xn(Xn({},Un.pX),{},{method:"POST",body:(0,Wn.encode)(o)}));case 6:return e.abrupt("return",!0);case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}var tr,nr,rr=n(71569),or=n.n(rr);function ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ir(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var lr=k.default.div(tr||(tr=ir(["\n text-align: center;\n background-color: ",";\n height: ",";\n width: 100%;\n box-sizing: border-box;\n overflow: scroll;\n"])),(0,$.pick)({enterprise:{light:$.variables.gray92,dark:$.variables.black}}),(function(e){return e.hasToolbar?"calc(100vh - 78px)":"100vh"})),ur=k.default.div(nr||(nr=ir(["\n display: flex;\n height: 100%;\n min-height: inherit;\n justify-content: center;\n"]))),sr="feedback_enabled",fr=[{icon:a.createElement(R(),null),title:"Chat",key:"chat"},{icon:a.createElement(T(),null),title:"Usage guidelines",key:"about"},{icon:a.createElement(O(),null),title:"Settings",key:"settings"}],mr={title:"Give us feedback!",content:a.createElement(j(),null,"Want to share your feedback? Contact us by email at  ",a.createElement(D(),{to:"mailto:mlsupport@splunk.com"},"mlsupport@splunk.com"))},pr=function(e){var t=e.sessionId,n=e.hasToolbar,r=ar((0,a.useState)(fr[0].key),2),o=r[0],c=r[1],i=ar((0,a.useState)(0),2),l=i[0],u=i[1],s=ar((0,a.useState)(!1),2),f=s[0],m=s[1];(0,a.useEffect)((function(){(function(){return zn.apply(this,arguments)})().then((function(e){u(e)})),function(e){return Vn.apply(this,arguments)}(sr).then((function(e){var t=parseInt(e);m(1===t)}))}),[]);var p=ar((0,a.useState)([]),2),h=p[0],d=p[1];return a.createElement(lr,{hasToolbar:n},a.createElement(or(),{style:{minHeight:"inherit",height:"100%"}},a.createElement(or().Row,{style:{paddingTop:"24px",paddingBottom:"12px",boxSizing:"border-box",minHeight:"inherit",height:"100%"}},a.createElement(or().Column,{style:{minWidth:"240px"},span:2},a.createElement(En,{choices:fr,about:mr,selected:o,setSelected:c})),a.createElement(or().Column,{style:{minHeight:"inherit",height:"100%",justifyContent:"center"},span:10},"chat"===o&&a.createElement(ur,null,a.createElement(yn,{style:{minHeight:"inherit",height:"100%",minWidth:"768px",maxWidth:"1100px",width:"85%"},goToAbout:function(){c("about")},feedbackEnabled:f,openInSearch:function(e){var t=function(e){return(0,De.createURL)("app/".concat(Pe.app,"/search"),{q:e,earliest:"-15@m",latest:"now"})}(e);window.open(t,"_blank")},runQuery:Gn,sendFeedback:function(e,n,r){(function(e,t,n,r){return qn.apply(this,arguments)})(t,e,n,r).then((function(){}))},isMissingPrereq:l,chatHistory:h,setChatHistory:d})),"about"===o&&a.createElement(ur,{style:{justifyContent:"left"}},a.createElement(jn,null)),"settings"===o&&a.createElement(ur,{style:{justifyContent:"left"}},a.createElement(In,{feedbackEnabled:f,updateFeedback:function(e){m(e),function(e,t){return er.apply(this,arguments)}(sr,e).then((function(t){t||m(!e)}))}}))))))},hr=(0,n(28721).Z)();o()(a.createElement($.SplunkThemeProvider,{family:"enterprise",colorScheme:"light"},a.createElement(pr,{sessionId:hr,hasToolbar:!0})),{pageTitle:"Splunk AI Assistant (Preview)",hideFooter:!0,layout:"fixed"})},51424:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),a=n(23645),c=n.n(a),i=n(61667),l=n.n(i),u=new URL(n(30289),n.b),s=new URL(n(96304),n.b),f=new URL(n(16221),n.b),m=new URL(n(60970),n.b),p=c()(o()),h=l()(u),d=l()(s),y=l()(f),b=l()(m);p.push([e.id,"body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\n.chat_area::-webkit-scrollbar {\n display: \"none\";\n}\n\n::-webkit-scrollbar {\n width: 0px;\n background: transparent; /* make scrollbar transparent */\n}\n\n/* Splunk Data Sans Regular */\n@font-face {\n font-family: 'Splunk Data Sans';\n src: url("+h+") format('woff');\n font-weight: normal;\n font-style: normal;\n}\n\n\n/* Splunk Data Sans Medium */\n@font-face {\n font-family: 'Splunk Data Sans';\n src: url("+d+") format('woff');\n font-weight: '500';\n font-style: normal;\n}\n\n\n/* Splunk Data Sans Bold */\n@font-face {\n font-family: 'Splunk Data Sans';\n src: url("+y+") format('woff');\n font-weight: bold;\n font-style: normal;\n}\n\n/* Splunk Data Sans Mono */\n@font-face {\n font-family: 'Splunk Data Mono';\n src: url("+b+") format('woff');\n font-weight: normal;\n font-style: normal;\n}\n",""]),t.Z=p},75401:function(e,t,n){e.exports=n.p+"src/resources/icons/Bot.svg?eb7bfed1bb0c67178d3d8ea1fa8f88ab"},29315:function(e,t,n){e.exports=n.p+"src/resources/icons/User.svg?d0f9fc27ce26170ed52bef67b20e16bd"},16221:function(e,t,n){"use strict";e.exports=n.p+"373d8e926330fb7b0883.woff"},96304:function(e,t,n){"use strict";e.exports=n.p+"f4fbd3dbb51cf94478cc.woff"},30289:function(e,t,n){"use strict";e.exports=n.p+"0621c0a2e90450de28f7.woff"},60970:function(e,t,n){"use strict";e.exports=n.p+"f90812bfcbd17580f8a2.woff"}},function(e){e.O(0,[358,801,447,700,128,602,186,275],(function(){return 82738,e(e.s=82738)})),e.O()}]);