object(V8JsException)#160 (11) {
  ["message":protected]=>
  string(81) "V8Js::executeString():5: TypeError: Cannot read property 'Component' of undefined"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(39) "/var/www/new-product/models/ReactJs.php"
  ["line":protected]=>
  int(156)
  ["trace":"Exception":private]=>
  array(7) {
    [0]=>
    array(6) {
      ["file"]=>
      string(39) "/var/www/new-product/models/ReactJs.php"
      ["line"]=>
      int(156)
      ["function"]=>
      string(13) "executeString"
      ["class"]=>
      string(4) "V8Js"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(1) {
        [0]=>
        string(80242) "var console = {warn: function(){}, error: print};;
var global = global || this, self = self || this, window = window || this;;
;
var React = global.React, ReactDOM = global.ReactDOM, ReactDOMServer = global.ReactDOMServer;;
"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;ib.position)return 1;return 0}},{key:"getOptions",value:function getOptions(){var _this3=this;var sortedOptions=this.props.options.sort(this.orderByPosition);return sortedOptions.map(function(option){var selectable=_this3.props.selectableAttributes.indexOf(option.id)!==-1;return React.createElement(Attribute,{data:option,key:option.id,selectAttribute:_this3.props.selectAttribute,selectable:selectable,clearAttributeGroupSelection:_this3.props.clearAttributeGroupSelection})})}},{key:"render",value:function render(){return React.createElement("div",{className:"attribute-group-wrap"},React.createElement("div",{className:"attribute-group-title"},this.props.name),React.createElement("div",{className:"attribute-group-options"},this.getOptions()))}}]);return AttributeGroup}(React.Component);AttributeGroup.propTypes={name:React.PropTypes.string,options:React.PropTypes.array,selected:React.PropTypes.bool,selectAttribute:React.PropTypes.func,selectableAttributes:React.PropTypes.array,clearAttributeGroupSelection:React.PropTypes.func};AttributeGroup.defaultProps={name:"",options:[],selected:false,selectAttribute:function selectAttribute(){},selectableAttributes:[],clearAttributeGroupSelection:function clearAttributeGroupSelection(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){return this.props.selectedVariant&&this.props.selectedVariant.qty}else if(this.props.pageData.variants.length==0&&this.props.pageData.base_qty>0){return true}else{return false}}},{key:"toDoBlock",value:function toDoBlock(){var toDoItems=[];for(var groupName in this.props.pageData.attributes){if(!this.props.pageData.attributes[groupName].selected)toDoItems.push(React.createElement("div",{className:"to-do-item",key:groupName},"Select ",groupName))}if(toDoItems.length){return React.createElement("div",{className:"to-do-wrap",le:true},toDoItems)}else{return""}}},{key:"oneLeftBlock",value:function oneLeftBlock(){return React.createElement("div",{className:"one-left-block"},"Only One Left!")}},{key:"displayToDo",value:function displayToDo(){this.setState({displayTodo:true})}},{key:"hideToDo",value:function hideToDo(){this.setState({displayTodo:false})}},{key:"addItemToCart",value:function addItemToCart(){if(this.buttonReady()){this.props.addItemToCart({idProduct:this.props.pageData.id,idCombination:this.props.selectedVariant.id})}else{}}},{key:"getAddToBag",value:function getAddToBag(){if(this.props.pageData.addToBagState=="processing"){return React.createElement("div",{className:"product-add-button"},React.createElement("img",{src:"/themes/azalea/img/load.gif"}))}else{return React.createElement("div",{className:"product-add-button"},React.createElement("span",null,"ADD TO BAG"),React.createElement("img",{style:{display:"none"},src:"/themes/azalea/img/load.gif"}))}}},{key:"render",value:function render(){return React.createElement("div",null,React.createElement("div",{className:"product-add-button-wrap"+(this.buttonReady()?"":" product-button-disabled")+(this.props.pageData.addToBagState=="processing"?" add-button-loading":""),onMouseEnter:this.displayToDo,onMouseLeave:this.hideToDo,onClick:this.addItemToCart},this.getAddToBag()),this.state.displayTodo?this.toDoBlock():"",this.props.selectedVariant&&this.props.selectedVariant.qty==1?this.oneLeftBlock():"")}}]);return AddButton}(React.Component);AddButton.propTypes={pageData:React.PropTypes.object,selectedVariant:React.PropTypes.any,addItemToCart:React.PropTypes.func};AddButton.defaultProps={pageData:{},selectedVariant:null,addItemToCart:function addItemToCart(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;ib.position){return 1}else if(a.positionb.position){return 1}else if(a.position0)return variant.images;var variantMatchingSelectedColor=this.variantMatchingSelectedColor();if(variantMatchingSelectedColor&&variantMatchingSelectedColor.images.length>0)return variantMatchingSelectedColor.images}catch(err){}var pageData=this.getPageData();if(pageData.images.length>0){return pageData.images}else{return pageData.base_product_images}}},{key:"render",value:function render(){var pageData=this.getPageData();return React.createElement("div",{className:"product-page-wrap"},React.createElement("div",{onClick:this.showState,className:"product-page-info-wrap"},React.createElement(Images,{images:this.getImages(),changeSelectedImageId:this.props.changeSelectedImageId,selectedImageId:pageData.selectedImageId,mobileLayout:pageData.mobileLayout}),React.createElement(Details,{pageData:pageData,selectAttribute:this.props.selectAttribute,selectedVariant:this.selectedVariant(),clearAttributeGroupSelection:this.props.onClearAttributeGroupSelection,addItemToCart:this.props.onAddItemToCart,getNewFadstirRecs:this.props.onGetNewFadstirRecs})),React.createElement(Recs,{recs:pageData.recs,mobileLayout:pageData.mobileLayout}),React.createElement(RecentlyViewed,{pageData:pageData}))}}]);return PageInternal}(React.Component);PageInternal.propTypes={pageData:React.PropTypes.object};PageInternal.defaultProps={pageData:{}};var pageState=function pageState(state){return{pageData:state.pageData}};var pageDispatch=function pageDispatch(dispatch){return{replacePageData:function replacePageData(pageData){dispatch(Actions.replacePageData(pageData))},changeSelectedImageId:function changeSelectedImageId(imageId){dispatch(Actions.changeSelectedImageId(imageId))},selectAttribute:function selectAttribute(selection){dispatch(Actions.selectAttribute(selection))},onClearAttributeGroupSelection:function onClearAttributeGroupSelection(attributeGroup){dispatch(Actions.clearAttributeGroupSelection(attributeGroup))},onAddItemToCart:function onAddItemToCart(productInfo){dispatch(ApiActions.addToCart(productInfo))},onSetMobileLayout:function onSetMobileLayout(newVal){dispatch(Actions.setMobileLayout(newVal))},onGetRecsFromFadstir:function onGetRecsFromFadstir(productInfo){dispatch(ApiActions.getRecsFromFadStir(productInfo))},onGetNewFadstirRecs:function onGetNewFadstirRecs(){dispatch(Actions.getNewFadstirRecs())}}};var Page=ReactRedux.connect(pageState,pageDispatch)(PageInternal);"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i4){recs=recs.slice(0,4)}return recs.map(function(rec,i){return React.createElement(FadstirRecProduct,{product:rec,totalProducts:recs.length,key:i})})}},{key:"render",value:function render(){if(this.props.recs.length==0){return React.createElement("div",null)}else{return React.createElement("div",{className:"complete-the-look-wrap"},React.createElement("div",{className:"complete-the-look-title",onClick:this.props.getNewFadstirRecs},"Frequently Bought Together",React.createElement("span",{className:"reload"},"↻")),React.createElement("div",{className:"complete-the-look"},this.getRecs()))}}}]);return CompleteTheLook}(React.Component);CompleteTheLook.propTypes={recs:React.PropTypes.array,getNewFadstirRecs:React.PropTypes.func};CompleteTheLook.defaultProps={recs:[],getNewFadstirRecs:function getNewFadstirRecs(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=970&&this.props.product.additional_images&&this.props.product.additional_images.length>0){var image=this.refs.image;if(this.props.product.additional_images[0]){image.src=this.props.product.additional_images[0].replace("http:","")}}}},{key:"changeToMainImage",value:function changeToMainImage(){var width=$(window).width();if(width>=970&&this.props.product.url){var image=this.refs.image;image.src=this.props.product.url.replace("http:","")}}},{key:"render",value:function render(){var product=this.props.product;var widthStyle="calc(100% / "+this.props.totalProducts+" - 10px)";var imgSrc=product.url.replace("http:","");return React.createElement("div",{className:"fadstir-rec-product",style:{width:widthStyle}},React.createElement("a",{href:product.purchase_url},React.createElement("div",{className:"rec-product-image-wrap"},React.createElement("img",{src:imgSrc,ref:"image",onMouseOver:this.changeToAltImage,onMouseOut:this.changeToMainImage})),React.createElement("div",{className:"rec-product-info-wrap"},React.createElement("div",{className:"rec-product-brand-name"},product.brand),React.createElement("div",{className:"rec-product-name"},product.product_display_name),this.getPrice(product))))}}]);return FadstirRecProduct}(React.Component);FadstirRecProduct.propTypes={product:React.PropTypes.object,totalProducts:React.PropTypes.number};FadstirRecProduct.defaultProps={product:{},totalProducts:1};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=970&&this.props.product.alt_image_link){var image=this.refs.image;image.src=this.props.product.alt_image_link}}},{key:"changeToMainImage",value:function changeToMainImage(){var width=$(window).width();if(width>=970&&this.props.product.image_link){var image=this.refs.image;image.src=this.props.product.image_link}}},{key:"render",value:function render(){var product=this.props.product;return React.createElement("div",{className:"rec-product"},React.createElement("div",{className:"rec-product-image-wrap"},React.createElement("a",{href:product.product_link},React.createElement("img",{onMouseOver:this.changeToAltImage,onMouseOut:this.changeToMainImage,className:"rec-product-image",src:product.image_link,ref:"image"}))),React.createElement("div",{className:"rec-product-info-wrap"},React.createElement("div",{className:"rec-product-brand-name"},React.createElement("a",{href:product.brand_link},product.brand_name)),React.createElement("div",{className:"rec-product-name"},React.createElement("a",{href:product.product_link},product.product_name)),React.createElement("div",{className:"rec-product-price-wrap"},React.createElement("a",{href:product.product_link},this.getPrice(product)))))}}]);return RecProduct}(React.Component);RecProduct.propTypes={product:React.PropTypes.object};RecProduct.defaultProps={product:{product_name:"",product_link:"",product_id:null,image_link:"",alt_image_link:"",brand_name:"",brand_link:"",on_sale:"0",
price:"",price_sale:"",colors_detail:""}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=size){break}}}return recsOut}},{key:"getProducts",value:function getProducts(){var productList=this.getProductList();return productList.map(function(product){return React.createElement(RecProduct,{product:product,key:product.product_id})})}},{key:"toggleExpand",value:function toggleExpand(){this.setState({expanded:!this.state.expanded})}},{key:"getExpand",value:function getExpand(){if(this.state.expanded){return React.createElement("div",{className:"expand-recs-wrap"},React.createElement("div",{className:"expand-recs",onClick:this.toggleExpand},React.createElement("div",{className:"expand-recs-text"},"View Less"),React.createElement("div",{className:"expand-recs-arrow"},React.createElement("span",{className:"ref-arrow-up"}))))}else{return React.createElement("div",{className:"expand-recs-wrap"},React.createElement("div",{className:"expand-recs",onClick:this.toggleExpand},React.createElement("div",{className:"expand-recs-text"},"View More"),React.createElement("div",{className:"expand-recs-arrow"},React.createElement("span",{className:"ref-arrow-down"}))))}}},{key:"singleRow",value:function singleRow(){return this.props.pageData.recentlyViewed&&this.props.pageData.recentlyViewed.length<=5}},{key:"render",value:function render(){var style={height:this.state.expanded?"":"680px"};if(this.singleRow())style={};if(this.props.pageData.recentlyViewed&&this.props.pageData.recentlyViewed.length>1){return React.createElement("div",{className:"product-recs-wrap"+(this.singleRow()?" single-row":""),style:style},React.createElement("div",{className:"product-recs-title"},"Recently Viewed"),React.createElement("div",{className:"product-recs"},this.getProducts()),this.singleRow()?"":this.getExpand())}else{return React.createElement("div",null)}}}]);return RecentlyViewed}(React.Component);RecentlyViewed.propTypes={pageData:React.PropTypes.object};RecentlyViewed.defaultProps={pageData:{recentlyViewed:[],id:null}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i
    array(6) {
      ["file"]=>
      string(39) "/var/www/new-product/models/ReactJs.php"
      ["line"]=>
      int(65)
      ["function"]=>
      string(9) "executeJS"
      ["class"]=>
      string(7) "ReactJS"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(1) {
        [0]=>
        &string(80242) "var console = {warn: function(){}, error: print};;
var global = global || this, self = self || this, window = window || this;;
;
var React = global.React, ReactDOM = global.ReactDOM, ReactDOMServer = global.ReactDOMServer;;
"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;ib.position)return 1;return 0}},{key:"getOptions",value:function getOptions(){var _this3=this;var sortedOptions=this.props.options.sort(this.orderByPosition);return sortedOptions.map(function(option){var selectable=_this3.props.selectableAttributes.indexOf(option.id)!==-1;return React.createElement(Attribute,{data:option,key:option.id,selectAttribute:_this3.props.selectAttribute,selectable:selectable,clearAttributeGroupSelection:_this3.props.clearAttributeGroupSelection})})}},{key:"render",value:function render(){return React.createElement("div",{className:"attribute-group-wrap"},React.createElement("div",{className:"attribute-group-title"},this.props.name),React.createElement("div",{className:"attribute-group-options"},this.getOptions()))}}]);return AttributeGroup}(React.Component);AttributeGroup.propTypes={name:React.PropTypes.string,options:React.PropTypes.array,selected:React.PropTypes.bool,selectAttribute:React.PropTypes.func,selectableAttributes:React.PropTypes.array,clearAttributeGroupSelection:React.PropTypes.func};AttributeGroup.defaultProps={name:"",options:[],selected:false,selectAttribute:function selectAttribute(){},selectableAttributes:[],clearAttributeGroupSelection:function clearAttributeGroupSelection(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){return this.props.selectedVariant&&this.props.selectedVariant.qty}else if(this.props.pageData.variants.length==0&&this.props.pageData.base_qty>0){return true}else{return false}}},{key:"toDoBlock",value:function toDoBlock(){var toDoItems=[];for(var groupName in this.props.pageData.attributes){if(!this.props.pageData.attributes[groupName].selected)toDoItems.push(React.createElement("div",{className:"to-do-item",key:groupName},"Select ",groupName))}if(toDoItems.length){return React.createElement("div",{className:"to-do-wrap",le:true},toDoItems)}else{return""}}},{key:"oneLeftBlock",value:function oneLeftBlock(){return React.createElement("div",{className:"one-left-block"},"Only One Left!")}},{key:"displayToDo",value:function displayToDo(){this.setState({displayTodo:true})}},{key:"hideToDo",value:function hideToDo(){this.setState({displayTodo:false})}},{key:"addItemToCart",value:function addItemToCart(){if(this.buttonReady()){this.props.addItemToCart({idProduct:this.props.pageData.id,idCombination:this.props.selectedVariant.id})}else{}}},{key:"getAddToBag",value:function getAddToBag(){if(this.props.pageData.addToBagState=="processing"){return React.createElement("div",{className:"product-add-button"},React.createElement("img",{src:"/themes/azalea/img/load.gif"}))}else{return React.createElement("div",{className:"product-add-button"},React.createElement("span",null,"ADD TO BAG"),React.createElement("img",{style:{display:"none"},src:"/themes/azalea/img/load.gif"}))}}},{key:"render",value:function render(){return React.createElement("div",null,React.createElement("div",{className:"product-add-button-wrap"+(this.buttonReady()?"":" product-button-disabled")+(this.props.pageData.addToBagState=="processing"?" add-button-loading":""),onMouseEnter:this.displayToDo,onMouseLeave:this.hideToDo,onClick:this.addItemToCart},this.getAddToBag()),this.state.displayTodo?this.toDoBlock():"",this.props.selectedVariant&&this.props.selectedVariant.qty==1?this.oneLeftBlock():"")}}]);return AddButton}(React.Component);AddButton.propTypes={pageData:React.PropTypes.object,selectedVariant:React.PropTypes.any,addItemToCart:React.PropTypes.func};AddButton.defaultProps={pageData:{},selectedVariant:null,addItemToCart:function addItemToCart(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;ib.position){return 1}else if(a.positionb.position){return 1}else if(a.position0)return variant.images;var variantMatchingSelectedColor=this.variantMatchingSelectedColor();if(variantMatchingSelectedColor&&variantMatchingSelectedColor.images.length>0)return variantMatchingSelectedColor.images}catch(err){}var pageData=this.getPageData();if(pageData.images.length>0){return pageData.images}else{return pageData.base_product_images}}},{key:"render",value:function render(){var pageData=this.getPageData();return React.createElement("div",{className:"product-page-wrap"},React.createElement("div",{onClick:this.showState,className:"product-page-info-wrap"},React.createElement(Images,{images:this.getImages(),changeSelectedImageId:this.props.changeSelectedImageId,selectedImageId:pageData.selectedImageId,mobileLayout:pageData.mobileLayout}),React.createElement(Details,{pageData:pageData,selectAttribute:this.props.selectAttribute,selectedVariant:this.selectedVariant(),clearAttributeGroupSelection:this.props.onClearAttributeGroupSelection,addItemToCart:this.props.onAddItemToCart,getNewFadstirRecs:this.props.onGetNewFadstirRecs})),React.createElement(Recs,{recs:pageData.recs,mobileLayout:pageData.mobileLayout}),React.createElement(RecentlyViewed,{pageData:pageData}))}}]);return PageInternal}(React.Component);PageInternal.propTypes={pageData:React.PropTypes.object};PageInternal.defaultProps={pageData:{}};var pageState=function pageState(state){return{pageData:state.pageData}};var pageDispatch=function pageDispatch(dispatch){return{replacePageData:function replacePageData(pageData){dispatch(Actions.replacePageData(pageData))},changeSelectedImageId:function changeSelectedImageId(imageId){dispatch(Actions.changeSelectedImageId(imageId))},selectAttribute:function selectAttribute(selection){dispatch(Actions.selectAttribute(selection))},onClearAttributeGroupSelection:function onClearAttributeGroupSelection(attributeGroup){dispatch(Actions.clearAttributeGroupSelection(attributeGroup))},onAddItemToCart:function onAddItemToCart(productInfo){dispatch(ApiActions.addToCart(productInfo))},onSetMobileLayout:function onSetMobileLayout(newVal){dispatch(Actions.setMobileLayout(newVal))},onGetRecsFromFadstir:function onGetRecsFromFadstir(productInfo){dispatch(ApiActions.getRecsFromFadStir(productInfo))},onGetNewFadstirRecs:function onGetNewFadstirRecs(){dispatch(Actions.getNewFadstirRecs())}}};var Page=ReactRedux.connect(pageState,pageDispatch)(PageInternal);"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i4){recs=recs.slice(0,4)}return recs.map(function(rec,i){return React.createElement(FadstirRecProduct,{product:rec,totalProducts:recs.length,key:i})})}},{key:"render",value:function render(){if(this.props.recs.length==0){return React.createElement("div",null)}else{return React.createElement("div",{className:"complete-the-look-wrap"},React.createElement("div",{className:"complete-the-look-title",onClick:this.props.getNewFadstirRecs},"Frequently Bought Together",React.createElement("span",{className:"reload"},"↻")),React.createElement("div",{className:"complete-the-look"},this.getRecs()))}}}]);return CompleteTheLook}(React.Component);CompleteTheLook.propTypes={recs:React.PropTypes.array,getNewFadstirRecs:React.PropTypes.func};CompleteTheLook.defaultProps={recs:[],getNewFadstirRecs:function getNewFadstirRecs(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=970&&this.props.product.additional_images&&this.props.product.additional_images.length>0){var image=this.refs.image;if(this.props.product.additional_images[0]){image.src=this.props.product.additional_images[0].replace("http:","")}}}},{key:"changeToMainImage",value:function changeToMainImage(){var width=$(window).width();if(width>=970&&this.props.product.url){var image=this.refs.image;image.src=this.props.product.url.replace("http:","")}}},{key:"render",value:function render(){var product=this.props.product;var widthStyle="calc(100% / "+this.props.totalProducts+" - 10px)";var imgSrc=product.url.replace("http:","");return React.createElement("div",{className:"fadstir-rec-product",style:{width:widthStyle}},React.createElement("a",{href:product.purchase_url},React.createElement("div",{className:"rec-product-image-wrap"},React.createElement("img",{src:imgSrc,ref:"image",onMouseOver:this.changeToAltImage,onMouseOut:this.changeToMainImage})),React.createElement("div",{className:"rec-product-info-wrap"},React.createElement("div",{className:"rec-product-brand-name"},product.brand),React.createElement("div",{className:"rec-product-name"},product.product_display_name),this.getPrice(product))))}}]);return FadstirRecProduct}(React.Component);FadstirRecProduct.propTypes={product:React.PropTypes.object,totalProducts:React.PropTypes.number};FadstirRecProduct.defaultProps={product:{},totalProducts:1};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=970&&this.props.product.alt_image_link){var image=this.refs.image;image.src=this.props.product.alt_image_link}}},{key:"changeToMainImage",value:function changeToMainImage(){var width=$(window).width();if(width>=970&&this.props.product.image_link){var image=this.refs.image;image.src=this.props.product.image_link}}},{key:"render",value:function render(){var product=this.props.product;return React.createElement("div",{className:"rec-product"},React.createElement("div",{className:"rec-product-image-wrap"},React.createElement("a",{href:product.product_link},React.createElement("img",{onMouseOver:this.changeToAltImage,onMouseOut:this.changeToMainImage,className:"rec-product-image",src:product.image_link,ref:"image"}))),React.createElement("div",{className:"rec-product-info-wrap"},React.createElement("div",{className:"rec-product-brand-name"},React.createElement("a",{href:product.brand_link},product.brand_name)),React.createElement("div",{className:"rec-product-name"},React.createElement("a",{href:product.product_link},product.product_name)),React.createElement("div",{className:"rec-product-price-wrap"},React.createElement("a",{href:product.product_link},this.getPrice(product)))))}}]);return RecProduct}(React.Component);RecProduct.propTypes={product:React.PropTypes.object};RecProduct.defaultProps={product:{product_name:"",product_link:"",product_id:null,image_link:"",alt_image_link:"",brand_name:"",brand_link:"",on_sale:"0",
price:"",price_sale:"",colors_detail:""}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=size){break}}}return recsOut}},{key:"getProducts",value:function getProducts(){var productList=this.getProductList();return productList.map(function(product){return React.createElement(RecProduct,{product:product,key:product.product_id})})}},{key:"toggleExpand",value:function toggleExpand(){this.setState({expanded:!this.state.expanded})}},{key:"getExpand",value:function getExpand(){if(this.state.expanded){return React.createElement("div",{className:"expand-recs-wrap"},React.createElement("div",{className:"expand-recs",onClick:this.toggleExpand},React.createElement("div",{className:"expand-recs-text"},"View Less"),React.createElement("div",{className:"expand-recs-arrow"},React.createElement("span",{className:"ref-arrow-up"}))))}else{return React.createElement("div",{className:"expand-recs-wrap"},React.createElement("div",{className:"expand-recs",onClick:this.toggleExpand},React.createElement("div",{className:"expand-recs-text"},"View More"),React.createElement("div",{className:"expand-recs-arrow"},React.createElement("span",{className:"ref-arrow-down"}))))}}},{key:"singleRow",value:function singleRow(){return this.props.pageData.recentlyViewed&&this.props.pageData.recentlyViewed.length<=5}},{key:"render",value:function render(){var style={height:this.state.expanded?"":"680px"};if(this.singleRow())style={};if(this.props.pageData.recentlyViewed&&this.props.pageData.recentlyViewed.length>1){return React.createElement("div",{className:"product-recs-wrap"+(this.singleRow()?" single-row":""),style:style},React.createElement("div",{className:"product-recs-title"},"Recently Viewed"),React.createElement("div",{className:"product-recs"},this.getProducts()),this.singleRow()?"":this.getExpand())}else{return React.createElement("div",null)}}}]);return RecentlyViewed}(React.Component);RecentlyViewed.propTypes={pageData:React.PropTypes.object};RecentlyViewed.defaultProps={pageData:{recentlyViewed:[],id:null}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i
    array(6) {
      ["file"]=>
      string(48) "/var/www/controllers/front/ProductController.php"
      ["line"]=>
      int(98)
      ["function"]=>
      string(11) "__construct"
      ["class"]=>
      string(7) "ReactJS"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(2) {
        [0]=>
        &string(0) ""
        [1]=>
        &string(80015) ""use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;ib.position)return 1;return 0}},{key:"getOptions",value:function getOptions(){var _this3=this;var sortedOptions=this.props.options.sort(this.orderByPosition);return sortedOptions.map(function(option){var selectable=_this3.props.selectableAttributes.indexOf(option.id)!==-1;return React.createElement(Attribute,{data:option,key:option.id,selectAttribute:_this3.props.selectAttribute,selectable:selectable,clearAttributeGroupSelection:_this3.props.clearAttributeGroupSelection})})}},{key:"render",value:function render(){return React.createElement("div",{className:"attribute-group-wrap"},React.createElement("div",{className:"attribute-group-title"},this.props.name),React.createElement("div",{className:"attribute-group-options"},this.getOptions()))}}]);return AttributeGroup}(React.Component);AttributeGroup.propTypes={name:React.PropTypes.string,options:React.PropTypes.array,selected:React.PropTypes.bool,selectAttribute:React.PropTypes.func,selectableAttributes:React.PropTypes.array,clearAttributeGroupSelection:React.PropTypes.func};AttributeGroup.defaultProps={name:"",options:[],selected:false,selectAttribute:function selectAttribute(){},selectableAttributes:[],clearAttributeGroupSelection:function clearAttributeGroupSelection(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){return this.props.selectedVariant&&this.props.selectedVariant.qty}else if(this.props.pageData.variants.length==0&&this.props.pageData.base_qty>0){return true}else{return false}}},{key:"toDoBlock",value:function toDoBlock(){var toDoItems=[];for(var groupName in this.props.pageData.attributes){if(!this.props.pageData.attributes[groupName].selected)toDoItems.push(React.createElement("div",{className:"to-do-item",key:groupName},"Select ",groupName))}if(toDoItems.length){return React.createElement("div",{className:"to-do-wrap",le:true},toDoItems)}else{return""}}},{key:"oneLeftBlock",value:function oneLeftBlock(){return React.createElement("div",{className:"one-left-block"},"Only One Left!")}},{key:"displayToDo",value:function displayToDo(){this.setState({displayTodo:true})}},{key:"hideToDo",value:function hideToDo(){this.setState({displayTodo:false})}},{key:"addItemToCart",value:function addItemToCart(){if(this.buttonReady()){this.props.addItemToCart({idProduct:this.props.pageData.id,idCombination:this.props.selectedVariant.id})}else{}}},{key:"getAddToBag",value:function getAddToBag(){if(this.props.pageData.addToBagState=="processing"){return React.createElement("div",{className:"product-add-button"},React.createElement("img",{src:"/themes/azalea/img/load.gif"}))}else{return React.createElement("div",{className:"product-add-button"},React.createElement("span",null,"ADD TO BAG"),React.createElement("img",{style:{display:"none"},src:"/themes/azalea/img/load.gif"}))}}},{key:"render",value:function render(){return React.createElement("div",null,React.createElement("div",{className:"product-add-button-wrap"+(this.buttonReady()?"":" product-button-disabled")+(this.props.pageData.addToBagState=="processing"?" add-button-loading":""),onMouseEnter:this.displayToDo,onMouseLeave:this.hideToDo,onClick:this.addItemToCart},this.getAddToBag()),this.state.displayTodo?this.toDoBlock():"",this.props.selectedVariant&&this.props.selectedVariant.qty==1?this.oneLeftBlock():"")}}]);return AddButton}(React.Component);AddButton.propTypes={pageData:React.PropTypes.object,selectedVariant:React.PropTypes.any,addItemToCart:React.PropTypes.func};AddButton.defaultProps={pageData:{},selectedVariant:null,addItemToCart:function addItemToCart(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;ib.position){return 1}else if(a.positionb.position){return 1}else if(a.position0)return variant.images;var variantMatchingSelectedColor=this.variantMatchingSelectedColor();if(variantMatchingSelectedColor&&variantMatchingSelectedColor.images.length>0)return variantMatchingSelectedColor.images}catch(err){}var pageData=this.getPageData();if(pageData.images.length>0){return pageData.images}else{return pageData.base_product_images}}},{key:"render",value:function render(){var pageData=this.getPageData();return React.createElement("div",{className:"product-page-wrap"},React.createElement("div",{onClick:this.showState,className:"product-page-info-wrap"},React.createElement(Images,{images:this.getImages(),changeSelectedImageId:this.props.changeSelectedImageId,selectedImageId:pageData.selectedImageId,mobileLayout:pageData.mobileLayout}),React.createElement(Details,{pageData:pageData,selectAttribute:this.props.selectAttribute,selectedVariant:this.selectedVariant(),clearAttributeGroupSelection:this.props.onClearAttributeGroupSelection,addItemToCart:this.props.onAddItemToCart,getNewFadstirRecs:this.props.onGetNewFadstirRecs})),React.createElement(Recs,{recs:pageData.recs,mobileLayout:pageData.mobileLayout}),React.createElement(RecentlyViewed,{pageData:pageData}))}}]);return PageInternal}(React.Component);PageInternal.propTypes={pageData:React.PropTypes.object};PageInternal.defaultProps={pageData:{}};var pageState=function pageState(state){return{pageData:state.pageData}};var pageDispatch=function pageDispatch(dispatch){return{replacePageData:function replacePageData(pageData){dispatch(Actions.replacePageData(pageData))},changeSelectedImageId:function changeSelectedImageId(imageId){dispatch(Actions.changeSelectedImageId(imageId))},selectAttribute:function selectAttribute(selection){dispatch(Actions.selectAttribute(selection))},onClearAttributeGroupSelection:function onClearAttributeGroupSelection(attributeGroup){dispatch(Actions.clearAttributeGroupSelection(attributeGroup))},onAddItemToCart:function onAddItemToCart(productInfo){dispatch(ApiActions.addToCart(productInfo))},onSetMobileLayout:function onSetMobileLayout(newVal){dispatch(Actions.setMobileLayout(newVal))},onGetRecsFromFadstir:function onGetRecsFromFadstir(productInfo){dispatch(ApiActions.getRecsFromFadStir(productInfo))},onGetNewFadstirRecs:function onGetNewFadstirRecs(){dispatch(Actions.getNewFadstirRecs())}}};var Page=ReactRedux.connect(pageState,pageDispatch)(PageInternal);"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i4){recs=recs.slice(0,4)}return recs.map(function(rec,i){return React.createElement(FadstirRecProduct,{product:rec,totalProducts:recs.length,key:i})})}},{key:"render",value:function render(){if(this.props.recs.length==0){return React.createElement("div",null)}else{return React.createElement("div",{className:"complete-the-look-wrap"},React.createElement("div",{className:"complete-the-look-title",onClick:this.props.getNewFadstirRecs},"Frequently Bought Together",React.createElement("span",{className:"reload"},"↻")),React.createElement("div",{className:"complete-the-look"},this.getRecs()))}}}]);return CompleteTheLook}(React.Component);CompleteTheLook.propTypes={recs:React.PropTypes.array,getNewFadstirRecs:React.PropTypes.func};CompleteTheLook.defaultProps={recs:[],getNewFadstirRecs:function getNewFadstirRecs(){}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=970&&this.props.product.additional_images&&this.props.product.additional_images.length>0){var image=this.refs.image;if(this.props.product.additional_images[0]){image.src=this.props.product.additional_images[0].replace("http:","")}}}},{key:"changeToMainImage",value:function changeToMainImage(){var width=$(window).width();if(width>=970&&this.props.product.url){var image=this.refs.image;image.src=this.props.product.url.replace("http:","")}}},{key:"render",value:function render(){var product=this.props.product;var widthStyle="calc(100% / "+this.props.totalProducts+" - 10px)";var imgSrc=product.url.replace("http:","");return React.createElement("div",{className:"fadstir-rec-product",style:{width:widthStyle}},React.createElement("a",{href:product.purchase_url},React.createElement("div",{className:"rec-product-image-wrap"},React.createElement("img",{src:imgSrc,ref:"image",onMouseOver:this.changeToAltImage,onMouseOut:this.changeToMainImage})),React.createElement("div",{className:"rec-product-info-wrap"},React.createElement("div",{className:"rec-product-brand-name"},product.brand),React.createElement("div",{className:"rec-product-name"},product.product_display_name),this.getPrice(product))))}}]);return FadstirRecProduct}(React.Component);FadstirRecProduct.propTypes={product:React.PropTypes.object,totalProducts:React.PropTypes.number};FadstirRecProduct.defaultProps={product:{},totalProducts:1};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=970&&this.props.product.alt_image_link){var image=this.refs.image;image.src=this.props.product.alt_image_link}}},{key:"changeToMainImage",value:function changeToMainImage(){var width=$(window).width();if(width>=970&&this.props.product.image_link){var image=this.refs.image;image.src=this.props.product.image_link}}},{key:"render",value:function render(){var product=this.props.product;return React.createElement("div",{className:"rec-product"},React.createElement("div",{className:"rec-product-image-wrap"},React.createElement("a",{href:product.product_link},React.createElement("img",{onMouseOver:this.changeToAltImage,onMouseOut:this.changeToMainImage,className:"rec-product-image",src:product.image_link,ref:"image"}))),React.createElement("div",{className:"rec-product-info-wrap"},React.createElement("div",{className:"rec-product-brand-name"},React.createElement("a",{href:product.brand_link},product.brand_name)),React.createElement("div",{className:"rec-product-name"},React.createElement("a",{href:product.product_link},product.product_name)),React.createElement("div",{className:"rec-product-price-wrap"},React.createElement("a",{href:product.product_link},this.getPrice(product)))))}}]);return RecProduct}(React.Component);RecProduct.propTypes={product:React.PropTypes.object};RecProduct.defaultProps={product:{product_name:"",product_link:"",product_id:null,image_link:"",alt_image_link:"",brand_name:"",brand_link:"",on_sale:"0",
price:"",price_sale:"",colors_detail:""}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i=size){break}}}return recsOut}},{key:"getProducts",value:function getProducts(){var productList=this.getProductList();return productList.map(function(product){return React.createElement(RecProduct,{product:product,key:product.product_id})})}},{key:"toggleExpand",value:function toggleExpand(){this.setState({expanded:!this.state.expanded})}},{key:"getExpand",value:function getExpand(){if(this.state.expanded){return React.createElement("div",{className:"expand-recs-wrap"},React.createElement("div",{className:"expand-recs",onClick:this.toggleExpand},React.createElement("div",{className:"expand-recs-text"},"View Less"),React.createElement("div",{className:"expand-recs-arrow"},React.createElement("span",{className:"ref-arrow-up"}))))}else{return React.createElement("div",{className:"expand-recs-wrap"},React.createElement("div",{className:"expand-recs",onClick:this.toggleExpand},React.createElement("div",{className:"expand-recs-text"},"View More"),React.createElement("div",{className:"expand-recs-arrow"},React.createElement("span",{className:"ref-arrow-down"}))))}}},{key:"singleRow",value:function singleRow(){return this.props.pageData.recentlyViewed&&this.props.pageData.recentlyViewed.length<=5}},{key:"render",value:function render(){var style={height:this.state.expanded?"":"680px"};if(this.singleRow())style={};if(this.props.pageData.recentlyViewed&&this.props.pageData.recentlyViewed.length>1){return React.createElement("div",{className:"product-recs-wrap"+(this.singleRow()?" single-row":""),style:style},React.createElement("div",{className:"product-recs-title"},"Recently Viewed"),React.createElement("div",{className:"product-recs"},this.getProducts()),this.singleRow()?"":this.getExpand())}else{return React.createElement("div",null)}}}]);return RecentlyViewed}(React.Component);RecentlyViewed.propTypes={pageData:React.PropTypes.object};RecentlyViewed.defaultProps={pageData:{recentlyViewed:[],id:null}};"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i
    array(6) {
      ["file"]=>
      string(48) "/var/www/controllers/front/ProductController.php"
      ["line"]=>
      int(119)
      ["function"]=>
      string(12) "templateVars"
      ["class"]=>
      string(21) "ProductControllerCore"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [4]=>
    array(6) {
      ["file"]=>
      string(42) "/var/www/classes/controller/Controller.php"
      ["line"]=>
      int(167)
      ["function"]=>
      string(11) "initContent"
      ["class"]=>
      string(21) "ProductControllerCore"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [5]=>
    array(6) {
      ["file"]=>
      string(31) "/var/www/classes/Dispatcher.php"
      ["line"]=>
      int(348)
      ["function"]=>
      string(3) "run"
      ["class"]=>
      string(14) "ControllerCore"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [6]=>
    array(6) {
      ["file"]=>
      string(18) "/var/www/index.php"
      ["line"]=>
      int(28)
      ["function"]=>
      string(8) "dispatch"
      ["class"]=>
      string(14) "DispatcherCore"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
  }
  ["previous":"Exception":private]=>
  NULL
  ["JsFileName":protected]=>
  string(21) "V8Js::executeString()"
  ["JsLineNumber":protected]=>
  int(5)
  ["JsSourceLine":protected]=>
  string(78) "group-options"},this.getOptions()))}}]);return AttributeGroup}(React.Component"
  ["JsTrace":protected]=>
  string(92) "TypeError: Cannot read property 'Component' of undefined
    at V8Js::executeString():5:3090"
}