(self.webpackChunkipywidgetvar=self.webpackChunkipywidgetvar||[]).push([[568],{163:(e,t,i)=>{var o=i(337),s=i(431),n=o.DOMWidgetModel.extend({defaults:s.extend(o.DOMWidgetModel.prototype.defaults(),{_model_name:"IpywidgetVarModel",_view_name:"IpywidgetVarView",_model_module:"ipywidgetvar",_view_module:"ipywidgetvar",_model_module_version:"0.1.13",_view_module_version:"0.1.13",value:"IpywidgetVar!",id:"id1",tojs:"from python to js",topython:"from js to python"})}),d=o.DOMWidgetView.extend({render:function(){this.value_changed(),this.id_changed(),this.topython_changed(),Object.defineProperty(this.el,"tojs_callback_List",{value:[],configurable:!0}),Object.defineProperty(this.el,"tojs_callback",{value:function(e){this.el.tojs_callback_List.push(e)}.bind(this),configurable:!0}),this.tojs_changed(),this.model.on("change:value",this.value_changed,this),this.model.on("change:id",this.id_changed,this),this.model.on("change:tojs",this.tojs_changed,this),this.model.on("change:topython",this.topython_changed,this)},value_changed:function(){console.log("set value"),this.el.textContent=this.model.get("value")},id_changed:function(){console.log("set id"),this.el.id=this.model.get("id"),Object.defineProperty(this.el,"IpywidgetVarValue",{value:function(e){this.model.set("value",e),this.model.save_changes()}.bind(this),configurable:!0})},tojs_changed:function(){var e;for(e=0;e<this.el.tojs_callback_List.length;e++)this.el.tojs_callback_List[e](JSON.parse(this.model.get("tojs")))},topython_changed:function(){Object.defineProperty(this.el,"IpywidgetVarTopython",{value:function(e){this.model.set("topython",JSON.stringify(e)),this.model.save_changes()}.bind(this),configurable:!0})}});e.exports={IpywidgetVarModel:n,IpywidgetVarView:d}},568:(e,t,i)=>{e.exports=i(163),e.exports.version=i(147).version},147:e=>{"use strict";e.exports={version:"0.1.13"}}}]);