LT-275: Adding button to add labels to measurements

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2016-11-15 08:24:30 +01:00
1 parent b1eb68521a
commit 3f0b9482d1
13 files changed
+77 -13

No files matched your search

@@ -1,5 +1,5 @@
<template name="componentPlayground"> <template name="componentPlayground">
<div class="component-playground"> <div class="component-playground">
{{>measureFlow treeColumns=true hideCommon=true}} {{>measureFlow threeColumns=true hideCommon=true}}
</div> </div>
</template> </template>
@@ -1,5 +1,5 @@
<template name="measureFlow"> <template name="measureFlow">
<div class="measure-flow {{#if this.treeColumns}}tree-columns{{/if}} {{instance.state.get}}" style="position:fixed; top:200px; left:400px"> <div class="measure-flow {{#if this.threeColumns}}tree-columns{{/if}} {{instance.state.get}}" style="top:{{choose position.y 0}}px;left:{{choose position.x 0}}px">
<button class="btn-add">Add label</button> <button class="btn-add">Add label</button>
{{#if eq instance.state.get 'selected'}} {{#if eq instance.state.get 'selected'}}
<div class="tree-leaf"> <div class="tree-leaf">
@@ -79,6 +79,10 @@ Template.measureFlow.onRendered(() => {
}); });
Template.measureFlow.events({ Template.measureFlow.events({
'click, mousedown, mouseup'(event, instance) {
event.stopPropagation();
},
'click .measure-flow .btn-add, click .measure-flow .btn-rename'(event, instance) { 'click .measure-flow .btn-add, click .measure-flow .btn-rename'(event, instance) {
// Set the open state for the component // Set the open state for the component
instance.state.set('open'); instance.state.set('open');
@@ -100,7 +104,7 @@ Template.measureFlow.events({
label: 'Assign label', label: 'Assign label',
searchPlaceholder: 'Search labels', searchPlaceholder: 'Search labels',
storageKey: 'measureLabelCommon', storageKey: 'measureLabelCommon',
treeColumns: instance.data.treeColumns, threeColumns: instance.data.threeColumns,
position position
}; };
@@ -1,7 +1,8 @@
@import "{design}/app" @import "{design}/app"
.measure-flow .measure-flow
position: relative position: fixed
z-index: 1
&.open, &.open,
&.selected &.selected
@@ -73,7 +74,7 @@
button button
theme('border', '1px solid $uiBorderColor') theme('border', '1px solid $uiBorderColor')
theme('color', '$textPrimaryColor') theme('color', '$textPrimaryColor')
background-color: transparent theme('background-color', '$primaryBackgroundColor')
border-radius: 16px border-radius: 16px
font-weight: normal font-weight: normal
height: 31px height: 31px
@@ -64,9 +64,9 @@ Template.selectTree.onRendered(() => {
instance.component = component; instance.component = component;
// Set the margin to display the common section // Set the margin to display the common section
const isTreeColumns = instance.data.treeColumns; const isthreeColumns = instance.data.threeColumns;
const marginProperty = isTreeColumns ? 'margin-left' : 'margin-right'; const marginProperty = isthreeColumns ? 'margin-left' : 'margin-right';
const marginWidth = isTreeColumns ? $treeRoot.width() / 2 : $treeRoot.width(); const marginWidth = isthreeColumns ? $treeRoot.width() / 2 : $treeRoot.width();
$treeRoot.children('.tree-content').css(marginProperty, marginWidth); $treeRoot.children('.tree-content').css(marginProperty, marginWidth);
// Make the component respect the window boundaries // Make the component respect the window boundaries
@@ -318,7 +318,7 @@ Template.selectTree.helpers({
} }
// Return the items sorted for tree columns // Return the items sorted for tree columns
if (instance.data.treeColumns) { if (instance.data.threeColumns) {
const begin = items.splice(0, Math.ceil(items.length / 2)); const begin = items.splice(0, Math.ceil(items.length / 2));
const sortedItems = []; const sortedItems = [];
_.each(begin, (item, index) => { _.each(begin, (item, index) => {
@@ -4,6 +4,8 @@ import { _ } from 'meteor/underscore';
Template.selectTreeCommon.events({ Template.selectTreeCommon.events({
'click .select-tree-common label'(event, instance) { 'click .select-tree-common label'(event, instance) {
event.preventDefault();
// Get the clicked label // Get the clicked label
const $target = $(event.currentTarget); const $target = $(event.currentTarget);
@@ -0,0 +1 @@
import './viewer/imageViewerViewport.js';
@@ -0,0 +1,27 @@
import { Template } from 'meteor/templating';
import { OHIF } from 'meteor/ohif:core';
Template.imageViewerViewport.events({
CornerstoneToolsMouseClick(event, instance, data) {
const toolState = cornerstoneTools.getToolState(instance.element, 'bidirectional');
// Stop here if no tool state was found
if (!toolState) {
return;
}
setTimeout(() => {
for (let i = 0; i < toolState.data.length; i++) {
const toolData = toolState.data[i];
if (toolData.active) {
OHIF.measurements.toggleLabelButton({
instance,
toolData,
position: data.currentPoints.page
});
break;
}
}
});
}
});
@@ -1,3 +1,4 @@
import './lib'; import './lib';
import './helpers'; import './helpers';
import './components'; import './components';
import './hooks';
@@ -8,3 +8,4 @@ import './hangingProtocolCustomizations.js';
import './MeasurementHandlers.js'; import './MeasurementHandlers.js';
import './MeasurementManager.js'; import './MeasurementManager.js';
import './syncMeasurementAndToolData.js'; import './syncMeasurementAndToolData.js';
import './toggleLabelButton.js';
@@ -0,0 +1,26 @@
import { Template } from 'meteor/templating';
import { Blaze } from 'meteor/blaze';
import { OHIF } from 'meteor/ohif:core';
OHIF.measurements.toggleLabelButton = options => {
const removeButtonView = () => {
Blaze.remove(options.instance.buttonView);
options.instance.buttonView = null;
};
if (options.instance.buttonView) {
removeButtonView();
} else {
const data = {
position: options.position,
threeColumns: true,
hideCommon: true,
doneCallback(data) {
console.warn('>>>>DONE CALLBACK', data);
removeButtonView();
}
};
const view = Blaze.renderWithData(Template.measureFlow, data, options.instance.element);
options.instance.buttonView = view;
}
};
@@ -452,6 +452,7 @@ Template.imageViewerViewport.onRendered(function() {
// When the imageViewerViewport template is rendered // When the imageViewerViewport template is rendered
var element = this.find('.imageViewerViewport'); var element = this.find('.imageViewerViewport');
this.element = element;
// Display the loading indicator for this element // Display the loading indicator for this element
$(element).siblings('.imageViewerLoadingIndicator').css('display', 'block'); $(element).siblings('.imageViewerLoadingIndicator').css('display', 'block');
@@ -504,9 +505,9 @@ Template.imageViewerViewport.onDestroyed(function() {
// Try to stop any currently playing clips // Try to stop any currently playing clips
// Otherwise the interval will continuously throw errors // Otherwise the interval will continuously throw errors
try { try {
var enabledElement = cornerstone.getEnabledElement(element); var enabledElement = cornerstone.getEnabledElement(this.element);
if (enabledElement) { if (enabledElement) {
cornerstoneTools.stopClip(element); cornerstoneTools.stopClip(this.element);
} }
} catch (error) { } catch (error) {
OHIF.log.warn(error); OHIF.log.warn(error);
@@ -515,7 +516,7 @@ Template.imageViewerViewport.onDestroyed(function() {
// Disable the viewport element with Cornerstone // Disable the viewport element with Cornerstone
// This also triggers the removal of the element from all available // This also triggers the removal of the element from all available
// synchronizers, such as the one used for reference lines. // synchronizers, such as the one used for reference lines.
cornerstone.disable(element); cornerstone.disable(this.element);
}); });
Template.imageViewerViewport.events({ Template.imageViewerViewport.events({
@@ -196,7 +196,7 @@ this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dat
n._simpleSchema=t,n._schema=t.schema(),n._schemaKeys=o.keys(n._schema),n._invalidKeys=[],n._deps={},n._depsAny=new r.Dependency,o.each(n._schemaKeys,function(e){n._deps[e]=new r.Dependency})},y.prototype.validate=function n(i,r){var a=this;r=o.extend({modifier:!1,upsert:!1,extendedCustomContext:{}},r||{}),e.isClient&&void 0===r.extendedCustomContext.userId&&(r.extendedCustomContext.userId=e.userId&&e.userId()||null);var s=t(i,r.modifier,r.upsert,null,a._simpleSchema,r.extendedCustomContext),u=o.pluck(a._invalidKeys,"name");a._invalidKeys=s;var l=o.pluck(a._invalidKeys,"name"),c=o.union(l,u);return a._markKeysChanged(c),0===a._invalidKeys.length},y.prototype.validateOne=function n(i,r,a){var s=this,u,l,c;a=o.extend({modifier:!1,upsert:!1,extendedCustomContext:{}},a||{}),e.isClient&&void 0===a.extendedCustomContext.userId&&(a.extendedCustomContext.userId=e.userId&&e.userId()||null);var f=t(i,a.modifier,a.upsert,r,s._simpleSchema,a.extendedCustomContext),d=[];for(u=0,l=s._invalidKeys.length;u<l;u++)c=s._invalidKeys[u],c.name!==r&&d.push(c);for(s._invalidKeys=d,u=0,l=f.length;u<l;u++)c=f[u],s._invalidKeys.push(c);return s._markKeysChanged([r]),!s._keyIsInvalid(r)},y.prototype.resetValidation=function e(){var t=this,n=o.pluck(t._invalidKeys,"name");t._invalidKeys=[],t._markKeysChanged(n)},y.prototype.isValid=function e(){var t=this;return t._depsAny.depend(),!t._invalidKeys.length},y.prototype.invalidKeys=function e(){var t=this;return t._depsAny.depend(),t._invalidKeys},y.prototype.addInvalidKeys=function e(t){var n=this;if(t&&t.length){var i=[];o.each(t,function(e){i.push(e.name),n._invalidKeys.push(e)}),n._markKeysChanged(i)}},y.prototype._markKeysChanged=function e(t){var n=this;t&&t.length&&(o.each(t,function(e){var t=d._makeGeneric(e);t in n._deps&&n._deps[t].changed()}),n._depsAny.changed())},y.prototype._getInvalidKeyObject=function e(t,n){var i=this;n=n||d._makeGeneric(t);var r=o.findWhere(i._invalidKeys,{name:t});return r||(r=o.findWhere(i._invalidKeys,{name:n})),r},y.prototype._keyIsInvalid=function e(t,n){return!!this._getInvalidKeyObject(t,n)},y.prototype.keyIsInvalid=function e(t){var n=this,i=d._makeGeneric(t);return n._deps[i]&&n._deps[i].depend(),n._keyIsInvalid(t,i)},y.prototype.keyErrorMessage=function e(t){var n=this,i=d._makeGeneric(t);n._deps[i]&&n._deps[i].depend();var r=n._getInvalidKeyObject(t,i);return r?n._simpleSchema.messageForError(r.type,r.name,null,r.value):""},y.prototype.getErrorObject=function t(){var n=this,i,r=this._invalidKeys;r.length?(i=n.keyErrorMessage(r[0].name),r=o.map(r,function(e){return o.extend({message:n.keyErrorMessage(e.name)},e)})):i="Failed validation";var a=new Error(i);return a.invalidKeys=r,e.isServer&&(a.sanitizedError=new e.Error(400,i)),a}}.call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["aldeed:simple-schema"]={},{SimpleSchema:d,MongoObject:c,humanize:l})}(); n._simpleSchema=t,n._schema=t.schema(),n._schemaKeys=o.keys(n._schema),n._invalidKeys=[],n._deps={},n._depsAny=new r.Dependency,o.each(n._schemaKeys,function(e){n._deps[e]=new r.Dependency})},y.prototype.validate=function n(i,r){var a=this;r=o.extend({modifier:!1,upsert:!1,extendedCustomContext:{}},r||{}),e.isClient&&void 0===r.extendedCustomContext.userId&&(r.extendedCustomContext.userId=e.userId&&e.userId()||null);var s=t(i,r.modifier,r.upsert,null,a._simpleSchema,r.extendedCustomContext),u=o.pluck(a._invalidKeys,"name");a._invalidKeys=s;var l=o.pluck(a._invalidKeys,"name"),c=o.union(l,u);return a._markKeysChanged(c),0===a._invalidKeys.length},y.prototype.validateOne=function n(i,r,a){var s=this,u,l,c;a=o.extend({modifier:!1,upsert:!1,extendedCustomContext:{}},a||{}),e.isClient&&void 0===a.extendedCustomContext.userId&&(a.extendedCustomContext.userId=e.userId&&e.userId()||null);var f=t(i,a.modifier,a.upsert,r,s._simpleSchema,a.extendedCustomContext),d=[];for(u=0,l=s._invalidKeys.length;u<l;u++)c=s._invalidKeys[u],c.name!==r&&d.push(c);for(s._invalidKeys=d,u=0,l=f.length;u<l;u++)c=f[u],s._invalidKeys.push(c);return s._markKeysChanged([r]),!s._keyIsInvalid(r)},y.prototype.resetValidation=function e(){var t=this,n=o.pluck(t._invalidKeys,"name");t._invalidKeys=[],t._markKeysChanged(n)},y.prototype.isValid=function e(){var t=this;return t._depsAny.depend(),!t._invalidKeys.length},y.prototype.invalidKeys=function e(){var t=this;return t._depsAny.depend(),t._invalidKeys},y.prototype.addInvalidKeys=function e(t){var n=this;if(t&&t.length){var i=[];o.each(t,function(e){i.push(e.name),n._invalidKeys.push(e)}),n._markKeysChanged(i)}},y.prototype._markKeysChanged=function e(t){var n=this;t&&t.length&&(o.each(t,function(e){var t=d._makeGeneric(e);t in n._deps&&n._deps[t].changed()}),n._depsAny.changed())},y.prototype._getInvalidKeyObject=function e(t,n){var i=this;n=n||d._makeGeneric(t);var r=o.findWhere(i._invalidKeys,{name:t});return r||(r=o.findWhere(i._invalidKeys,{name:n})),r},y.prototype._keyIsInvalid=function e(t,n){return!!this._getInvalidKeyObject(t,n)},y.prototype.keyIsInvalid=function e(t){var n=this,i=d._makeGeneric(t);return n._deps[i]&&n._deps[i].depend(),n._keyIsInvalid(t,i)},y.prototype.keyErrorMessage=function e(t){var n=this,i=d._makeGeneric(t);n._deps[i]&&n._deps[i].depend();var r=n._getInvalidKeyObject(t,i);return r?n._simpleSchema.messageForError(r.type,r.name,null,r.value):""},y.prototype.getErrorObject=function t(){var n=this,i,r=this._invalidKeys;r.length?(i=n.keyErrorMessage(r[0].name),r=o.map(r,function(e){return o.extend({message:n.keyErrorMessage(e.name)},e)})):i="Failed validation";var a=new Error(i);return a.invalidKeys=r,e.isServer&&(a.sanitizedError=new e.Error(400,i)),a}}.call(this),"undefined"==typeof Package&&(Package={}),function(e,t){for(var n in t)n in e||(e[n]=t[n])}(Package["aldeed:simple-schema"]={},{SimpleSchema:d,MongoObject:c,humanize:l})}();
!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,r=Package.jquery.jQuery,a=Package.underscore._,i=Package["templating-runtime"].Template,u=Package["reactive-var"].ReactiveVar,c=Package["clinical:router"].Router,l=Package["clinical:router"].RouteController,s=Package["aldeed:simple-schema"].SimpleSchema,p=Package["aldeed:simple-schema"].MongoObject,m=Package.modules.meteorInstall,d=Package.modules.Buffer,f=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,v=Package["ecmascript-runtime"].Map,g=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,b=Package.promise.Promise,y=Package["iron:core"].Iron,w=Package.webapp.WebApp,x=Package.logging.Log,j=Package.deps.Tracker,T=Package.deps.Deps,I=Package.session.Session,C=Package["ddp-client"].DDP,M=Package.mongo.Mongo,S=Package.ui.Blaze,_=Package.ui.UI,$=Package.ui.Handlebars,H=Package.spacebars.Spacebars,O=Package.check.check,P=Package.check.Match,D=Package.random.Random,F=Package.ejson.EJSON,N=Package["launch-screen"].LaunchScreen,A=Package.htmljs.HTML,z,E,R=m({node_modules:{meteor:{"ohif:core":{"main.js":function(t,n,o){o.export({OHIF:function(){return r}});var r={};e.isDevelopment&&e.isClient&&(window.OHIF=r)},client:{"index.js":["./lib","./components","./helpers","./ui","./routes.js",function(e,t,n){n.import("./lib"),n.import("./components"),n.import("./helpers"),n.import("./ui"),n.import("./routes.js")}],"routes.js":["meteor/clinical:router",function(e,t,n){var o;n.import("meteor/clinical:router",{Router:function(e){o=e}}),o.route("/playground",function(){this.render("componentPlayground")})}],components:{"index.js":["./base","./bootstrap","./playground/playground.html","./playground/playground.styl","./playground/playground.js",function(e,t,n){n.import("./base"),n.import("./bootstrap"),n.import("./playground/playground.html"),n.import("./playground/playground.styl"),n.import("./playground/playground.js")}],base:{"component.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var a=function(){function e(t){o(this,e),t.view._component=this,t.sections={},this.templateInstance=t,this.registeredItems=new g}return e.prototype.registerSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(this.parent=e,e.registeredItems.add(this))}return e}(),e.prototype.unregisterSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(delete this.parent,e.registeredItems.delete(this))}return e}(),e}();r.Component=a}],"index.js":["./component.js","./mixin.js","./template.js","./section/section.html","./section/section.js","./mixins/button.js","./mixins/component.js","./mixins/form.js","./mixins/formItem.js","./mixins/group.js","./mixins/groupRadio.js","./mixins/input.js","./mixins/checkbox.js","./mixins/schemaData.js","./mixins/select.js","./mixins/select2.js","./mixins/selectTree.js","./templates/button.html","./templates/custom.html","./templates/div.html","./templates/form.html","./templates/input.html","./templates/select.html","./wrappers/label.html","./wrappers/labelContent.html",function(e,t,n){n.import("./component.js"),n.import("./mixin.js"),n.import("./template.js"),n.import("./section/section.html"),n.import("./section/section.js"),n.import("./mixins/button.js"),n.import("./mixins/component.js"),n.import("./mixins/form.js"),n.import("./mixins/formItem.js"),n.import("./mixins/group.js"),n.import("./mixins/groupRadio.js"),n.import("./mixins/input.js"),n.import("./mixins/checkbox.js"),n.import("./mixins/schemaData.js"),n.import("./mixins/select.js"),n.import("./mixins/select2.js"),n.import("./mixins/selectTree.js"),n.import("./templates/button.html"),n.import("./templates/custom.html"),n.import("./templates/div.html"),n.import("./templates/form.html"),n.import("./templates/input.html"),n.import("./templates/select.html"),n.import("./wrappers/label.html"),n.import("./wrappers/labelContent.html")}],"mixin.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core","meteor/underscore",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var a;n.import("meteor/underscore",{_:function(e){a=e}}),r.mixins={};var i=function(){function e(t){var n=t.dependencies,r=t.composition;o(this,e),this.dependencies=n||"",this.composition=r}return e.prototype.init=function(){function t(t,n,o,r){var i=this,u=this.dependencies.split(" ");a.each(u,function(a){if(a){var u=e.getMixin(a);if(u===i)throw new Error("Mixin "+a+" has a cyclic dependency.");u.init(t,n,o,r)}}),this.apply(t,n,o,r)}return t}(),e.prototype.apply=function(){function e(e,t,n,o){if(!a.contains(n,this)){var r=this.composition;a.each(o,function(n){var o=n;"onMixins"===o&&(o="onRendered"),"oLine truncated !function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.jquery.$,r=Package.jquery.jQuery,a=Package.underscore._,i=Package["templating-runtime"].Template,u=Package["reactive-var"].ReactiveVar,c=Package["clinical:router"].Router,l=Package["clinical:router"].RouteController,s=Package["aldeed:simple-schema"].SimpleSchema,p=Package["aldeed:simple-schema"].MongoObject,m=Package.modules.meteorInstall,d=Package.modules.Buffer,f=Package.modules.process,h=Package["ecmascript-runtime"].Symbol,v=Package["ecmascript-runtime"].Map,g=Package["ecmascript-runtime"].Set,k=Package["babel-runtime"].meteorBabelHelpers,b=Package.promise.Promise,y=Package["iron:core"].Iron,w=Package.webapp.WebApp,x=Package.logging.Log,j=Package.deps.Tracker,T=Package.deps.Deps,I=Package.session.Session,C=Package["ddp-client"].DDP,M=Package.mongo.Mongo,S=Package.ui.Blaze,_=Package.ui.UI,$=Package.ui.Handlebars,H=Package.spacebars.Spacebars,O=Package.check.check,P=Package.check.Match,D=Package.random.Random,F=Package.ejson.EJSON,N=Package["launch-screen"].LaunchScreen,A=Package.htmljs.HTML,z,E,R=m({node_modules:{meteor:{"ohif:core":{"main.js":function(t,n,o){o.export({OHIF:function(){return r}});var r={};e.isDevelopment&&e.isClient&&(window.OHIF=r)},client:{"index.js":["./lib","./components","./helpers","./ui","./routes.js",function(e,t,n){n.import("./lib"),n.import("./components"),n.import("./helpers"),n.import("./ui"),n.import("./routes.js")}],"routes.js":["meteor/clinical:router",function(e,t,n){var o;n.import("meteor/clinical:router",{Router:function(e){o=e}}),o.route("/playground",function(){this.render("componentPlayground")})}],components:{"index.js":["./base","./bootstrap","./playground/playground.html","./playground/playground.styl","./playground/playground.js",function(e,t,n){n.import("./base"),n.import("./bootstrap"),n.import("./playground/playground.html"),n.import("./playground/playground.styl"),n.import("./playground/playground.js")}],base:{"component.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var a=function(){function e(t){o(this,e),t.view._component=this,t.sections={},this.templateInstance=t,this.registeredItems=new g}return e.prototype.registerSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(this.parent=e,e.registeredItems.add(this))}return e}(),e.prototype.unregisterSelf=function(){function e(){var e=r.blaze.getParentComponent(this.templateInstance.view);e&&(delete this.parent,e.registeredItems.delete(this))}return e}(),e}();r.Component=a}],"index.js":["./component.js","./mixin.js","./template.js","./section/section.html","./section/section.js","./mixins/button.js","./mixins/component.js","./mixins/form.js","./mixins/formItem.js","./mixins/group.js","./mixins/groupRadio.js","./mixins/input.js","./mixins/checkbox.js","./mixins/schemaData.js","./mixins/select.js","./mixins/select2.js","./mixins/selectTree.js","./templates/button.html","./templates/custom.html","./templates/div.html","./templates/form.html","./templates/input.html","./templates/select.html","./wrappers/label.html","./wrappers/labelContent.html",function(e,t,n){n.import("./component.js"),n.import("./mixin.js"),n.import("./template.js"),n.import("./section/section.html"),n.import("./section/section.js"),n.import("./mixins/button.js"),n.import("./mixins/component.js"),n.import("./mixins/form.js"),n.import("./mixins/formItem.js"),n.import("./mixins/group.js"),n.import("./mixins/groupRadio.js"),n.import("./mixins/input.js"),n.import("./mixins/checkbox.js"),n.import("./mixins/schemaData.js"),n.import("./mixins/select.js"),n.import("./mixins/select2.js"),n.import("./mixins/selectTree.js"),n.import("./templates/button.html"),n.import("./templates/custom.html"),n.import("./templates/div.html"),n.import("./templates/form.html"),n.import("./templates/input.html"),n.import("./templates/select.html"),n.import("./wrappers/label.html"),n.import("./wrappers/labelContent.html")}],"mixin.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core","meteor/underscore",function(e,t,n){var o;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){o=e}});var r;n.import("meteor/ohif:core",{OHIF:function(e){r=e}});var a;n.import("meteor/underscore",{_:function(e){a=e}}),r.mixins={};var i=function(){function e(t){var n=t.dependencies,r=t.composition;o(this,e),this.dependencies=n||"",this.composition=r}return e.prototype.init=function(){function t(t,n,o,r){var i=this,u=this.dependencies.split(" ");a.each(u,function(a){if(a){var u=e.getMixin(a);if(u===i)throw new Error("Mixin "+a+" has a cyclic dependency.");u.init(t,n,o,r)}}),this.apply(t,n,o,r)}return t}(),e.prototype.apply=function(){function e(e,t,n,o){if(!a.contains(n,this)){var r=this.composition;a.each(o,function(n){var o=n;"onMixins"===o&&(o="onRendered"),"oLine truncated
})})})},"group.html":["./template.group.js",function(e,t,n){n.exports=e("./template.group.js")}],"template.group.js":function(){i.__checkName("group"),i.group=new i("Template.group",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({class:H.dataMustache(e.lookup("concat"),"component-group ",H.dot(e.lookup("."),"class")),base:"baseDiv",mixins:H.dataMustache(e.lookup("concat"),"group ",H.dot(e.lookup("."),"mixins"))}))},function(){return H.include(e.lookupTemplate("baseComponent"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n "]})})})}},input:{"checkbox.html":["./template.checkbox.js",function(e,t,n){n.exports=e("./template.checkbox.js")}],"template.checkbox.js":function(){i.__checkName("inputCheckbox"),i.inputCheckbox=new i("Template.inputCheckbox",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({base:"baseInput",type:"checkbox",mixins:H.dataMustache(e.lookup("concat"),"checkbox ",H.dot(e.lookup("."),"mixins")),labelAfter:H.dataMustache(e.lookup("valueIf"),H.dataMustache(e.lookup("isUndefined"),H.dot(e.lookup("."),"labelAfter")),!0,H.dot(e.lookup("."),"labelAfter")),labelClass:H.dataMustache(e.lookup("concat"),"checkboxLabel ",H.dot(e.lookup("."),"labelClass")),wrappers:H.dataMustache(e.lookup("concat"),"",H.dataMustache(e.lookup("valueIf"),e.lookup("reactive"),H.dot(e.lookup("."),"label"),"wrapperLabel ",""),H.dot(e.lookup("."),"wrappers"))}))},function(){return H.include(e.lookupTemplate("baseComponent"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n "]})})})},"groupRadio.html":["./template.groupRadio.js",function(e,t,n){n.exports=e("./template.groupRadio.js")}],"template.groupRadio.js":function(){i.__checkName("groupRadio"),i.groupRadio=new i("Template.groupRadio",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({class:H.dataMustache(e.lookup("concat"),"group-radio ",H.dot(e.lookup("."),"class")),mixins:H.dataMustache(e.lookup("concat"),"groupRadio ",H.dot(e.lookup("."),"mixins")),wrappers:H.dataMustache(e.lookup("concat"),"",H.dataMustache(e.lookup("valueIf"),e.lookup("reactive"),H.dot(e.lookup("."),"label"),"wrapperLabel ",""),H.dot(e.lookup("."),"wrappers")),labelAsDiv:!0}))},function(){return H.include(e.lookupTemplate("group"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n ",S.Each(function(){return{_sequence:H.dataMustache(e.lookup("reactive"),H.dot(e.lookup("."),"items")),_variable:"item"}},function(){return["\n ",S._TemplateWith(function(){return{class:H.call(H.dot(e.lookup("."),"radioClass")),name:H.call(H.dot(e.lookup("."),"key")),value:H.call(H.dot(e.lookup("item"),"value")),label:H.call(H.dot(e.lookup("item"),"label")),checked:H.call(H.dataMustache(e.lookup("eq"),H.dot(e.lookup("item"),"value"),H.dataMustache(e.lookup("reactive"),H.dot(e.lookup("."),"value"))))}},function(){return H.include(e.lookupTemplate("inputRadio"))}),"\n "]}),"\n "]})})})},"hidden.html":["./template.hidden.js",function(e,t,n){n.exports=e("./template.hidden.js")}],"template.hidden.js":function(){i.__checkName("inputHidden"),i.inputHidden=new i("Template.inputHidden",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({base:"baseInput",type:"hidden",mixins:H.dataMustache(e.lookup("concat"),"input ",H.dot(e.lookup("."),"mixins"))}))},function(){return H.include(e.lookupTemplate("baseComponent"))})})},"radio.html":["./template.radio.js",function(e,t,n){n.exports=e("./template.radio.js")}],"template.radio.js":function(){i.__checkName("inputRadio"),i.inputRadio=new i("Template.inputRadio",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({base:"baseInput",type:"radio",mixins:H.dataMustache(e.lookup("concat"),"input ",H.dot(e.lookup("."),"mixins")),labelAfter:H.dataMustache(e.lookup("valueIf"),H.dataMustache(e.lookup("isUndefined"),H.dot(e.lookup("."),"labelAfter")),!0,H.dot(e.lookup("."),"labelAfter")),labelClass:H.dataMustache(e.lookup("concat"),"radioLabel ",H.dot(e.lookup("."),"labelClass")),wrappers:H.dataMustache(e.lookup("concat"),"",H.dataMustache(e.lookup("valueIf"),e.lookup("reactive"),H.dot(e.lookup("."),"label"),"wrapperLabel ",""),H.dot(e.lookup("."),"wrappers"))}))},function(){return H.include(e.lookupTemplate("baseComponent"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n "]})})})},"range.html":["./template.range.js",function(e,t,n){n.exports=e("./template.range.js")}],"templateLine truncated })})})},"group.html":["./template.group.js",function(e,t,n){n.exports=e("./template.group.js")}],"template.group.js":function(){i.__checkName("group"),i.group=new i("Template.group",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({class:H.dataMustache(e.lookup("concat"),"component-group ",H.dot(e.lookup("."),"class")),base:"baseDiv",mixins:H.dataMustache(e.lookup("concat"),"group ",H.dot(e.lookup("."),"mixins"))}))},function(){return H.include(e.lookupTemplate("baseComponent"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n "]})})})}},input:{"checkbox.html":["./template.checkbox.js",function(e,t,n){n.exports=e("./template.checkbox.js")}],"template.checkbox.js":function(){i.__checkName("inputCheckbox"),i.inputCheckbox=new i("Template.inputCheckbox",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({base:"baseInput",type:"checkbox",mixins:H.dataMustache(e.lookup("concat"),"checkbox ",H.dot(e.lookup("."),"mixins")),labelAfter:H.dataMustache(e.lookup("valueIf"),H.dataMustache(e.lookup("isUndefined"),H.dot(e.lookup("."),"labelAfter")),!0,H.dot(e.lookup("."),"labelAfter")),labelClass:H.dataMustache(e.lookup("concat"),"checkboxLabel ",H.dot(e.lookup("."),"labelClass")),wrappers:H.dataMustache(e.lookup("concat"),"",H.dataMustache(e.lookup("valueIf"),e.lookup("reactive"),H.dot(e.lookup("."),"label"),"wrapperLabel ",""),H.dot(e.lookup("."),"wrappers"))}))},function(){return H.include(e.lookupTemplate("baseComponent"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n "]})})})},"groupRadio.html":["./template.groupRadio.js",function(e,t,n){n.exports=e("./template.groupRadio.js")}],"template.groupRadio.js":function(){i.__checkName("groupRadio"),i.groupRadio=new i("Template.groupRadio",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({class:H.dataMustache(e.lookup("concat"),"group-radio ",H.dot(e.lookup("."),"class")),mixins:H.dataMustache(e.lookup("concat"),"groupRadio ",H.dot(e.lookup("."),"mixins")),wrappers:H.dataMustache(e.lookup("concat"),"",H.dataMustache(e.lookup("valueIf"),e.lookup("reactive"),H.dot(e.lookup("."),"label"),"wrapperLabel ",""),H.dot(e.lookup("."),"wrappers")),labelAsDiv:!0}))},function(){return H.include(e.lookupTemplate("group"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n ",S.Each(function(){return{_sequence:H.dataMustache(e.lookup("reactive"),H.dot(e.lookup("."),"items")),_variable:"item"}},function(){return["\n ",S._TemplateWith(function(){return{class:H.call(H.dot(e.lookup("."),"radioClass")),name:H.call(H.dot(e.lookup("."),"key")),value:H.call(H.dot(e.lookup("item"),"value")),label:H.call(H.dot(e.lookup("item"),"label")),checked:H.call(H.dataMustache(e.lookup("eq"),H.dot(e.lookup("item"),"value"),H.dataMustache(e.lookup("reactive"),H.dot(e.lookup("."),"value"))))}},function(){return H.include(e.lookupTemplate("inputRadio"))}),"\n "]}),"\n "]})})})},"hidden.html":["./template.hidden.js",function(e,t,n){n.exports=e("./template.hidden.js")}],"template.hidden.js":function(){i.__checkName("inputHidden"),i.inputHidden=new i("Template.inputHidden",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({base:"baseInput",type:"hidden",mixins:H.dataMustache(e.lookup("concat"),"input ",H.dot(e.lookup("."),"mixins"))}))},function(){return H.include(e.lookupTemplate("baseComponent"))})})},"radio.html":["./template.radio.js",function(e,t,n){n.exports=e("./template.radio.js")}],"template.radio.js":function(){i.__checkName("inputRadio"),i.inputRadio=new i("Template.inputRadio",function(){var e=this;return S._TemplateWith(function(){return H.dataMustache(e.lookup("extend"),e.lookup("."),H.kw({base:"baseInput",type:"radio",mixins:H.dataMustache(e.lookup("concat"),"input ",H.dot(e.lookup("."),"mixins")),labelAfter:H.dataMustache(e.lookup("valueIf"),H.dataMustache(e.lookup("isUndefined"),H.dot(e.lookup("."),"labelAfter")),!0,H.dot(e.lookup("."),"labelAfter")),labelClass:H.dataMustache(e.lookup("concat"),"radioLabel ",H.dot(e.lookup("."),"labelClass")),wrappers:H.dataMustache(e.lookup("concat"),"",H.dataMustache(e.lookup("valueIf"),e.lookup("reactive"),H.dot(e.lookup("."),"label"),"wrapperLabel ",""),H.dot(e.lookup("."),"wrappers"))}))},function(){return H.include(e.lookupTemplate("baseComponent"),function(){return["\n ",S._InOuterTemplateScope(e,function(){return H.include(function(){return H.call(e.templateContentBlock)})}),"\n "]})})})},"range.html":["./template.range.js",function(e,t,n){n.exports=e("./template.range.js")}],"templateLine truncated
n+o!==u+o&&(i=!1)}),(!t||a)&&i)return!1}if(!e&&!n){var u=!0;if(r.forEach(function(e,t){var n=e[0].displaySetIndex,o=e.length;n-o!==-o&&(u=!1)}),(!t||a)&&u)return!1}return!0},o.viewer.moveSingleViewportDisplaySets=function(e,t){var n=o.uiSettings.displaySetNavigationLoopOverSeries,r=window.layoutManager.viewportData[e],i=a.findWhere(window.layoutManager.studies,{studyInstanceUid:r.studyInstanceUid})||window.layoutManager.studies[0],u=i.displaySets,c=a.findWhere(u,{displaySetInstanceUid:r.displaySetInstanceUid}),l=a.indexOf(u,c);if(t){if(l++,l>=u.length){if(!n)return;l=0}}else if(l--,l<0){if(!n)return;l=u.length-1}var s=u[l];window.layoutManager.rerenderViewportWithNewDisplaySet(e,s)},o.viewer.moveMultipleViewportDisplaySets=function(e){var t=o.uiSettings.displaySetNavigationLoopOverSeries,n=new o.viewer.getDisplaySetSequenceMap,r=o.viewer.isDisplaySetsSequenced(n),a=[];n.forEach(function(n,o){n.sort(function(e,t){return e.displaySetIndex>t.displaySetIndex});var i=o.displaySets,u=n[0].displaySetIndex,c=n.length,l=u%c,s=l?u-l:u,p=e?1:-1;s+=c*p;var m=i.length;if(s>=m){var d=m%c||c,f=m-d;if(u+c!==f+c)s=f;else{if(!t)return;s=0}}else if(s<0)if(u>0)s=0;else{if(!t)return;s=m-1-(m-1)%c}else r||(s=0);n.forEach(function(e,t){var n=e.viewportIndex,o=s+t,r=i[o]||{};a.push(r)})});var i=o.utils.sortBy({name:"studyInstanceUid"},{name:"seriesNumber"},{name:"instanceNumber"});a.sort(function(e,t){return i(e,t)}),a.forEach(function(e,t){window.layoutManager.rerenderViewportWithNewDisplaySet(t,e)})},o.viewer.moveDisplaySets=function(e){if(o.uiSettings.displaySetNavigationMultipleViewports)o.viewer.moveMultipleViewportDisplaySets(e);else{var t=I.get("activeViewport");o.viewer.moveSingleViewportDisplaySets(t,e)}}}],"third-party":{"transition-to-from-auto.js":["babel-runtime/helpers/typeof",function(e,t,n){var o;n.import("babel-runtime/helpers/typeof",{default:function(e){o=e}}),function(e,t){"use strict";function r(e,t){var n=e.element,o=e.val,r=e.prop,a=n.style,c,l;if(!s)return a[r]=o;if(n.hasAttribute(u))n.removeEventListener(p,t.l);else{if(a[s]="none",c=i(n)[r],a[r]="auto",l=i(n)[r],c===o||"auto"===o&&c===l)return;t.auto=l,n.setAttribute(u,1),a[r]=c,n.offsetWidth,a[s]=e.style}a[r]="auto"===o?t.auto:o,t.l=function(e){e.propertyName===r&&(n.removeAttribute(u),n.removeEventListener(p,t.l),"auto"===o&&(a[s]="none",a[r]=o))},n.addEventListener(p,t.l)}function a(e){var n=e.element,o,a;"string"==typeof n&&(n=t.querySelector(n)),n=e.element=n instanceof Node&&n,e.prop=e.prop||"height",e.style=e.style||"",n&&(a=c.indexOf(n),~a?o=l[a]:(o={},c.push(n),l.push(o)),r(e,o))}var i=e.getComputedStyle,u="data-ttfaInTransition",c=[],l=[],s=!1,p=!1,m=t.createElement("a").style,d;void 0!==m[d="webkitTransition"]&&(s=d,p=d+"End"),void 0!==m[d="transition"]&&(s=d,p=d+"end"),a.prop=s,a.end=p,"object"===("undefined"==typeof n?"undefined":o(n))&&n.exports?n.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):e.transition=a}(window,document)}]}},ui:{"index.js":["./bounded/bounded.js","./draggable/draggable.js","./resizable/resizable.js",function(e,t,n){n.import("./bounded/bounded.js"),n.import("./draggable/draggable.js"),n.import("./resizable/resizable.js")}],bounded:{"bounded.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core",function(e,t,n){var r;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){r=e}});var i;n.import("meteor/ohif:core",{OHIF:function(e){i=e}}),o.fn.bounded=function(e){return a.each(this,function(t){var n=o(t).data("boundedInstance");"destroy"===e&&n?(o(t).removeData("boundedInstance"),n.destroy()):n?n.options(e):o(t).data("boundedInstance",new u(t,e))}),this};var u=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];r(this,e),this.element=t,this.$element=o(t),this.options(n)}return e.prototype.options=function(){function e(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.boundingElement,n=e.allowResizing;this.boundingElement=t||window,this.$boundingElement=o(this.boundingElement),this.allowResizing=n,this.destroy(),this.init()}return e}(),e.prototype.init=function(){function e(){this.defineEventHandlers(),this.attachEventHandlers(),this.$element.addClass("bounded")}return e}(),e.prototype.destroy=function(){function e(){this.detachEventHandlers(),this.$element.removeClass("bounded")}return e}(),e.spatialInfo=function(){function e(e){var t={},n=e===window?window.document.body:e,r=o(n),a=n.style;a.width&&a.width.indexOf("px")>-1?t.width=parseInt(a.width):t.width=r.outerWidth(),a.height&&a.height.indexOf("px")>-1?t.height=parseInt(a.height):t.height=r.outerHeight();var i=r.offset();return t.x0=i.left,t.y0=i.top,t.x1=t.x0+t.width,t.y1=t.y0+t.height,t}return e}(),e.prototype.defineEventHandlers=function(){function t(){var t=this;this.spatialChangedHandler=function(n){var o=e.spatialInfo(t.element),r=e.spatialInfo(t.boundingElement);t.allowResizing&&o.width>r.width?(t.$element.width(r.width),t.$element.css("left",r.x0)):o.x0<Line truncated n+o!==u+o&&(i=!1)}),(!t||a)&&i)return!1}if(!e&&!n){var u=!0;if(r.forEach(function(e,t){var n=e[0].displaySetIndex,o=e.length;n-o!==-o&&(u=!1)}),(!t||a)&&u)return!1}return!0},o.viewer.moveSingleViewportDisplaySets=function(e,t){var n=o.uiSettings.displaySetNavigationLoopOverSeries,r=window.layoutManager.viewportData[e],i=a.findWhere(window.layoutManager.studies,{studyInstanceUid:r.studyInstanceUid})||window.layoutManager.studies[0],u=i.displaySets,c=a.findWhere(u,{displaySetInstanceUid:r.displaySetInstanceUid}),l=a.indexOf(u,c);if(t){if(l++,l>=u.length){if(!n)return;l=0}}else if(l--,l<0){if(!n)return;l=u.length-1}var s=u[l];window.layoutManager.rerenderViewportWithNewDisplaySet(e,s)},o.viewer.moveMultipleViewportDisplaySets=function(e){var t=o.uiSettings.displaySetNavigationLoopOverSeries,n=new o.viewer.getDisplaySetSequenceMap,r=o.viewer.isDisplaySetsSequenced(n),a=[];n.forEach(function(n,o){n.sort(function(e,t){return e.displaySetIndex>t.displaySetIndex});var i=o.displaySets,u=n[0].displaySetIndex,c=n.length,l=u%c,s=l?u-l:u,p=e?1:-1;s+=c*p;var m=i.length;if(s>=m){var d=m%c||c,f=m-d;if(u+c!==f+c)s=f;else{if(!t)return;s=0}}else if(s<0)if(u>0)s=0;else{if(!t)return;s=m-1-(m-1)%c}else r||(s=0);n.forEach(function(e,t){var n=e.viewportIndex,o=s+t,r=i[o]||{};a.push(r)})});var i=o.utils.sortBy({name:"studyInstanceUid"},{name:"seriesNumber"},{name:"instanceNumber"});a.sort(function(e,t){return i(e,t)}),a.forEach(function(e,t){window.layoutManager.rerenderViewportWithNewDisplaySet(t,e)})},o.viewer.moveDisplaySets=function(e){if(o.uiSettings.displaySetNavigationMultipleViewports)o.viewer.moveMultipleViewportDisplaySets(e);else{var t=I.get("activeViewport");o.viewer.moveSingleViewportDisplaySets(t,e)}}}],"third-party":{"transition-to-from-auto.js":["babel-runtime/helpers/typeof",function(e,t,n){var o;n.import("babel-runtime/helpers/typeof",{default:function(e){o=e}}),function(e,t){"use strict";function r(e,t){var n=e.element,o=e.val,r=e.prop,a=n.style,c,l;if(!s)return a[r]=o;if(n.hasAttribute(u))n.removeEventListener(p,t.l);else{if(a[s]="none",c=i(n)[r],a[r]="auto",l=i(n)[r],c===o||"auto"===o&&c===l)return;t.auto=l,n.setAttribute(u,1),a[r]=c,n.offsetWidth,a[s]=e.style}a[r]="auto"===o?t.auto:o,t.l=function(e){e.propertyName===r&&(n.removeAttribute(u),n.removeEventListener(p,t.l),"auto"===o&&(a[s]="none",a[r]=o))},n.addEventListener(p,t.l)}function a(e){var n=e.element,o,a;"string"==typeof n&&(n=t.querySelector(n)),n=e.element=n instanceof Node&&n,e.prop=e.prop||"height",e.style=e.style||"",n&&(a=c.indexOf(n),~a?o=l[a]:(o={},c.push(n),l.push(o)),r(e,o))}var i=e.getComputedStyle,u="data-ttfaInTransition",c=[],l=[],s=!1,p=!1,m=t.createElement("a").style,d;void 0!==m[d="webkitTransition"]&&(s=d,p=d+"End"),void 0!==m[d="transition"]&&(s=d,p=d+"end"),a.prop=s,a.end=p,"object"===("undefined"==typeof n?"undefined":o(n))&&n.exports?n.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):e.transition=a}(window,document)}]}},ui:{"index.js":["./bounded/bounded.js","./draggable/draggable.js","./resizable/resizable.js",function(e,t,n){n.import("./bounded/bounded.js"),n.import("./draggable/draggable.js"),n.import("./resizable/resizable.js")}],bounded:{"bounded.js":["babel-runtime/helpers/classCallCheck","meteor/ohif:core",function(e,t,n){var r;n.import("babel-runtime/helpers/classCallCheck",{default:function(e){r=e}});var i;n.import("meteor/ohif:core",{OHIF:function(e){i=e}}),o.fn.bounded=function(e){return a.each(this,function(t){var n=o(t).data("boundedInstance");"destroy"===e&&n?(o(t).removeData("boundedInstance"),n.destroy()):n?n.options(e):o(t).data("boundedInstance",new u(t,e))}),this};var u=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];r(this,e),this.element=t,this.$element=o(t),this.options(n)}return e.prototype.options=function(){function e(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.boundingElement,n=e.allowResizing;this.boundingElement=t||window,this.$boundingElement=o(this.boundingElement),this.allowResizing=n,this.destroy(),this.init()}return e}(),e.prototype.init=function(){function e(){this.defineEventHandlers(),this.attachEventHandlers(),this.$element.addClass("bounded")}return e}(),e.prototype.destroy=function(){function e(){this.detachEventHandlers(),this.$element.removeClass("bounded")}return e}(),e.spatialInfo=function(){function e(e){var t={},n=e===window?window.document.body:e,r=o(n),a=n.style;a.width&&a.width.indexOf("px")>-1?t.width=parseInt(a.width):t.width=r.outerWidth(),a.height&&a.height.indexOf("px")>-1?t.height=parseInt(a.height):t.height=r.outerHeight();var i=r.offset();return t.x0=i.left,t.y0=i.top,t.x1=t.x0+t.width,t.y1=t.y0+t.height,t}return e}(),e.prototype.defineEventHandlers=function(){function t(){var t=this;this.spatialChangedHandler=function(n){var o=e.spatialInfo(t.element),r=e.spatialInfo(t.boundingElement);t.allowResizing&&o.width>r.width?(t.$element.width(r.width),t.$element.css("left",r.x0)):o.x0<Line truncated
!function(){var e=Package.meteor.Meteor,a=Package.meteor.global,c=Package.meteor.meteorEnv;"undefined"==typeof Package&&(Package={}),Package.coffeescript={}}(); !function(){var e=Package.meteor.Meteor,a=Package.meteor.global,c=Package.meteor.meteorEnv;"undefined"==typeof Package&&(Package={}),Package.coffeescript={}}();