{"version":3,"sources":["Excerpt.min__d67acfe80778de2e04cc.js","./src/ui/Excerpt/Excerpt.ts"],"names":["webpackJsonpCoveo__temporary","252","module","exports","__webpack_require__","__extends","this","extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__","constructor","prototype","create","defineProperty","value","element","options","bindings","result","Excerpt","ID","ComponentOptions","initComponentOptions","resolveResult","Assert","exists","innerHTML","HighlightUtils","highlightString","excerpt","excerptHighlights","_this","doExport","exportGlobally","Component","Initialization","registerAutoCreateComponent","612"],"mappings":"AAAAA,8BAA8B,KAExBC,IACA,SAAUC,EAAQC,EAASC,GAEjC,YAEA,IAAIC,GAAaC,MAAQA,KAAKD,WAAc,WACxC,GAAIE,GAAgBC,OAAOC,iBACpBC,uBAA2BC,QAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,GAAIC,KAAKD,GAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,IACzE,OAAO,UAAUF,EAAGC,GAEhB,QAASG,KAAOV,KAAKW,YAAcL,EADnCL,EAAcK,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaL,OAAOW,OAAON,IAAMG,EAAGE,UAAYL,EAAEK,UAAW,GAAIF,OAGvFR,QAAOY,eAAejB,EAAS,cAAgBkB,OAAO,GCjBtD,YAGA,OACA,OACA,QACA,OACA,MACA,OAQA,mBAiBE,WAAmBC,EAA6BC,EAAsBC,EAAsCC,GAA5G,MACE,YAAMH,EAASI,EAAQC,GAAIH,IAAS,IDiBhC,OClBa,GAAAF,UAA6B,EAAAC,UAAsB,EAAAC,WAAsC,EAAAC,SAE1G,EAAKF,QAAU,EAAAK,iBAAiBC,qBAAqBP,EAASI,EAASH,GACvE,EAAKE,OAAS,EAAKA,QAAU,EAAKK,gBAClC,EAAAC,OAAOC,OAAO,EAAKP,QACnB,EAAKH,QAAQW,UAAY,EAAAC,eAAeC,gBAAgB,EAAKV,OAAOW,QAAS,EAAKX,OAAOY,kBAAmB,KAAM,mBDavGC,ECXf,MAxB6B,QACpB,EAAAX,GAAK,UAEL,EAAAY,SAAW,WAChB,EAAAC,gBACEd,QAASA,KAmBf,GAxB6B,EAAAe,UAAhB,GAAAf,UA0Bb,EAAAgB,eAAeC,4BAA4BjB,IDyBrCkB,IACA,SAAU1C,EAAQC","file":"Excerpt.min__d67acfe80778de2e04cc.js","sourcesContent":["webpackJsonpCoveo__temporary([72],{\n\n/***/ 252:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Component_1 = __webpack_require__(7);\nvar ComponentOptions_1 = __webpack_require__(8);\nvar Assert_1 = __webpack_require__(5);\nvar HighlightUtils_1 = __webpack_require__(68);\nvar Initialization_1 = __webpack_require__(2);\nvar GlobalExports_1 = __webpack_require__(3);\n__webpack_require__(612);\n/**\n * The Excerpt component renders an excerpt of its associated result and highlights the keywords from the query using\n * the appropriate template helpers.\n *\n * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).\n */\nvar Excerpt = /** @class */ (function (_super) {\n __extends(Excerpt, _super);\n /**\n * Creates a new Excerpt component.\n * @param element The HTMLElement on which to instantiate the component.\n * @param options The options for the Excerpt component.\n * @param bindings The bindings that the component requires to function normally. If not set, these will be\n * automatically resolved (with a slower execution time).\n * @param result The result to associate the component with.\n */\n function Excerpt(element, options, bindings, result) {\n var _this = _super.call(this, element, Excerpt.ID, bindings) || this;\n _this.element = element;\n _this.options = options;\n _this.bindings = bindings;\n _this.result = result;\n _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Excerpt, options);\n _this.result = _this.result || _this.resolveResult();\n Assert_1.Assert.exists(_this.result);\n _this.element.innerHTML = HighlightUtils_1.HighlightUtils.highlightString(_this.result.excerpt, _this.result.excerptHighlights, null, 'coveo-highlight');\n return _this;\n }\n Excerpt.ID = 'Excerpt';\n Excerpt.doExport = function () {\n GlobalExports_1.exportGlobally({\n Excerpt: Excerpt\n });\n };\n return Excerpt;\n}(Component_1.Component));\nexports.Excerpt = Excerpt;\nInitialization_1.Initialization.registerAutoCreateComponent(Excerpt);\n\n\n/***/ }),\n\n/***/ 612:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// Excerpt.min__d67acfe80778de2e04cc.js","import { Component } from '../Base/Component';\nimport { IComponentBindings } from '../Base/ComponentBindings';\nimport { IQueryResult } from '../../rest/QueryResult';\nimport { ComponentOptions } from '../Base/ComponentOptions';\nimport { Assert } from '../../misc/Assert';\nimport { HighlightUtils } from '../../utils/HighlightUtils';\nimport { Initialization } from '../Base/Initialization';\nimport { exportGlobally } from '../../GlobalExports';\nimport 'styling/_Excerpt';\n\n/**\n * The Excerpt component renders an excerpt of its associated result and highlights the keywords from the query using\n * the appropriate template helpers.\n *\n * This component is a result template component (see [Result Templates](https://docs.coveo.com/en/413/)).\n */\nexport class Excerpt extends Component {\n static ID = 'Excerpt';\n\n static doExport = () => {\n exportGlobally({\n Excerpt: Excerpt\n });\n };\n\n /**\n * Creates a new Excerpt component.\n * @param element The HTMLElement on which to instantiate the component.\n * @param options The options for the Excerpt component.\n * @param bindings The bindings that the component requires to function normally. If not set, these will be\n * automatically resolved (with a slower execution time).\n * @param result The result to associate the component with.\n */\n constructor(public element: HTMLElement, public options?: any, public bindings?: IComponentBindings, public result?: IQueryResult) {\n super(element, Excerpt.ID, bindings);\n this.options = ComponentOptions.initComponentOptions(element, Excerpt, options);\n this.result = this.result || this.resolveResult();\n Assert.exists(this.result);\n this.element.innerHTML = HighlightUtils.highlightString(this.result.excerpt, this.result.excerptHighlights, null, 'coveo-highlight');\n }\n}\n\nInitialization.registerAutoCreateComponent(Excerpt);\n\n\n\n// WEBPACK FOOTER //\n// ./src/ui/Excerpt/Excerpt.ts"],"sourceRoot":""}