{"version":3,"sources":["webpack:///../jarvis/app/assets/javascripts/site/controllers/PhotoMap/components/PhotoMapWidget/components/PhotoPins/templates/cssScope.ts","webpack:///../jarvis/app/assets/javascripts/site/controllers/PhotoMap/components/PhotoMapWidget/components/PhotoPins/templates/ProductPin.tsx"],"names":["createScope","ProductPin","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","apply","arguments","imgRef","createRef","contentRef","parentRef","state","activated","handleMouseOver","setState","key","value","_this$props","this","props","pin","zone","onClick","entity","h","className","htmlClassNames","similar","auto_similar","style","left","concat","x","top","y","onMouseOver","ref","current","LazyHtmlComponent","path","loading_url","el","parent","isReloadComponents","Component"],"mappings":"4FAAA,WAEeA,gBADU,mB,4rCCGlB,IAAMC,EAAU,SAAAC,I,kOAAAC,CAAAF,EAAAC,GAAA,I,MAAAE,EAAAC,EAAAJ,GACnB,SAAAA,IAAc,IAAAK,EASR,OATQC,EAAA,KAAAN,IACVK,EAAAF,EAAAI,MAAA,KAASC,YACJC,OAASC,sBACdL,EAAKM,WAAaD,sBAClBL,EAAKO,UAAYF,sBACjBL,EAAKQ,MAAQ,CAAEC,WAAW,GAC1BT,EAAKU,gBAAkB,WACdV,EAAKQ,MAAMC,WACZT,EAAKW,SAAS,CAAEF,WAAW,KACjCT,EAYL,O,EAXAL,G,EAAA,EAAAiB,IAAA,SAAAC,MAAA,WACQ,IAAAC,EAC0BC,KAAKC,MAA5BC,EAAGH,EAAHG,IAAKC,EAAIJ,EAAJI,KAAMC,EAAOL,EAAPK,QACbC,EAASH,EAAIG,OACnB,OAAQC,YAAE,MAAO,CAAEC,UAAWC,YAAe,2CAA4C,CAAE,UAAaN,EAAIO,SAAWP,EAAIQ,eAAiB,YAAaP,EAAMQ,MAAO,CAAEC,KAAM,GAAFC,OAAKX,EAAIY,EAAC,KAAKC,IAAK,GAAFF,OAAKX,EAAIc,EAAC,MAAOZ,QAASA,GACpNE,YAAE,MAAO,CAAEC,UAAW,WACtBD,YAAE,MAAO,CAAEC,UAAW,UAAWU,YAAajB,KAAKL,kBACnDW,YAAE,MAAO,CAAEC,UAAW,WAAYW,IAAKlB,KAAKR,WACxCc,YAAE,MAAO,CAAEC,UAAW,WAAaL,EAAIO,SAAWP,EAAIQ,aAAe,gBAAkB,uBACvFJ,YAAE,MAAO,CAAEY,IAAKlB,KAAKT,aACrBS,KAAKT,WAAW4B,SAAWnB,KAAKR,UAAU2B,SAAWnB,KAAKP,MAAMC,WAAcY,YAAEc,IAAmB,CAAEC,KAAMhB,EAAOiB,YAAaC,GAAIvB,KAAKT,WAAW4B,QAASK,OAAQxB,KAAKR,UAAU2B,QAASM,oBAAoB,W,2BAC3N7C,EAtBkB,CAAS8C","file":"chunk.104.58f33d484dd92a13c248.680cd61c.js","sourcesContent":["import { createScope } from 'core/services/VDOM';\nexport const ScopeName = 'ProductPreview';\nexport default createScope(ScopeName);\n","import { Component, createRef } from 'preact';\nimport htmlClassNames from 'core/utils/htmlClassNames';\nimport h from './cssScope';\nimport { LazyHtmlComponent } from 'site/VControllers/LazyHtml';\nexport class ProductPin extends Component {\n constructor() {\n super(...arguments);\n this.imgRef = createRef();\n this.contentRef = createRef();\n this.parentRef = createRef();\n this.state = { activated: false };\n this.handleMouseOver = () => {\n if (!this.state.activated)\n this.setState({ activated: true });\n };\n }\n render() {\n const { pin, zone, onClick } = this.props;\n const entity = pin.entity;\n return (h(\"div\", { className: htmlClassNames('c-photo-map-pin c-photo-map-pin__product', { '__similar': pin.similar || pin.auto_similar }), \"data-zone\": zone, style: { left: `${pin.x}%`, top: `${pin.y}%` }, onClick: onClick },\n h(\"div\", { className: '_round' }),\n h(\"div\", { className: '_toggle', onMouseOver: this.handleMouseOver }),\n h(\"div\", { className: '_content', ref: this.parentRef },\n h(\"div\", { className: '_header' }, pin.similar || pin.auto_similar ? 'Сюда подойдет' : 'Точное соответствие'),\n h(\"div\", { ref: this.contentRef }),\n this.contentRef.current && this.parentRef.current && this.state.activated && (h(LazyHtmlComponent, { path: entity.loading_url, el: this.contentRef.current, parent: this.parentRef.current, isReloadComponents: true })))));\n }\n}\n"],"sourceRoot":""}