Fix #6893 - fix roo docs
[roojs1] / Roo / ContentPanel.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11 /**
12  * @class Roo.ContentPanel
13  * @extends Roo.util.Observable
14  * A basic ContentPanel element.
15  * @cfg {Boolean}   fitToFrame    True for this panel to adjust its size to fit when the region resizes  (defaults to false)
16  * @cfg {Boolean}   fitContainer   When using {@link #fitToFrame} and {@link #resizeEl}, you can also fit the parent container  (defaults to false)
17  * @cfg {Boolean/Object} autoCreate True to auto generate the DOM element for this panel, or a {@link Roo.DomHelper} config of the element to create
18  * @cfg {Boolean}   closable      True if the panel can be closed/removed
19  * @cfg {Boolean}   background    True if the panel should not be activated when it is added (defaults to false)
20  * @cfg {String/HTMLElement/Element} resizeEl An element to resize if {@link #fitToFrame} is true (instead of this panel's element)
21  * @cfg {Toolbar}   toolbar       A toolbar for this panel
22  * @cfg {Boolean} autoScroll    True to scroll overflow in this panel (use with {@link #fitToFrame})
23  * @cfg {String} title          The title for this panel
24  * @cfg {Array} adjustments     Values to <b>add</b> to the width/height when doing a {@link #fitToFrame} (default is [0, 0])
25  * @cfg {String} url            Calls {@link #setUrl} with this value
26  * @cfg {String} region         (center|north|south|east|west) which region to put this panel on (when used with xtype constructors)
27  * @cfg {String/Object} params  When used with {@link #url}, calls {@link #setUrl} with this value
28  * @cfg {Boolean} loadOnce      When used with {@link #url}, calls {@link #setUrl} with this value
29  * @cfg {String}    content        Raw content to fill content panel with (uses setContent on construction.)
30  * @cfg {String}    style  Extra style to add to the content panel 
31
32  * @constructor
33  * Create a new ContentPanel.
34  * @param {String/HTMLElement/Roo.Element} el The container element for this panel
35  * @param {String/Object} config A string to set only the title or a config object
36  * @param {String} content (optional) Set the HTML content for this panel
37  * @param {String} region (optional) Used by xtype constructors to add to regions. (values center,east,west,south,north)
38  */
39 Roo.ContentPanel = function(el, config, content){
40     
41      
42     /*
43     if(el.autoCreate || el.xtype){ // xtype is available if this is called from factory
44         config = el;
45         el = Roo.id();
46     }
47     if (config && config.parentLayout) { 
48         el = config.parentLayout.el.createChild(); 
49     }
50     */
51     if(el.autoCreate){ // xtype is available if this is called from factory
52         config = el;
53         el = Roo.id();
54     }
55     this.el = Roo.get(el);
56     if(!this.el && config && config.autoCreate){
57         if(typeof config.autoCreate == "object"){
58             if(!config.autoCreate.id){
59                 config.autoCreate.id = config.id||el;
60             }
61             this.el = Roo.DomHelper.append(document.body,
62                         config.autoCreate, true);
63         }else{
64             this.el = Roo.DomHelper.append(document.body,
65                         {tag: "div", cls: "x-layout-inactive-content", id: config.id||el}, true);
66         }
67     }
68     
69     
70     this.closable = false;
71     this.loaded = false;
72     this.active = false;
73     if(typeof config == "string"){
74         this.title = config;
75     }else{
76         Roo.apply(this, config);
77     }
78     
79     if (this.toolbar && !this.toolbar.el && this.toolbar.xtype) {
80         this.wrapEl = this.el.wrap();
81         this.toolbar.container = this.el.insertSibling(false, 'before');
82         this.toolbar = new Roo.Toolbar(this.toolbar);
83     }
84     
85     // xtype created footer. - not sure if will work as we normally have to render first..
86     if (this.footer && !this.footer.el && this.footer.xtype) {
87         if (!this.wrapEl) {
88             this.wrapEl = this.el.wrap();
89         }
90     
91         this.footer.container = this.wrapEl.createChild();
92          
93         this.footer = Roo.factory(this.footer, Roo);
94         
95     }
96     
97     if(this.resizeEl){
98         this.resizeEl = Roo.get(this.resizeEl, true);
99     }else{
100         this.resizeEl = this.el;
101     }
102     // handle view.xtype
103     
104  
105     
106     
107     this.addEvents({
108         /**
109          * @event activate
110          * Fires when this panel is activated. 
111          * @param {Roo.ContentPanel} this
112          */
113         "activate" : true,
114         /**
115          * @event deactivate
116          * Fires when this panel is activated. 
117          * @param {Roo.ContentPanel} this
118          */
119         "deactivate" : true,
120
121         /**
122          * @event resize
123          * Fires when this panel is resized if fitToFrame is true.
124          * @param {Roo.ContentPanel} this
125          * @param {Number} width The width after any component adjustments
126          * @param {Number} height The height after any component adjustments
127          */
128         "resize" : true,
129         
130          /**
131          * @event render
132          * Fires when this tab is created
133          * @param {Roo.ContentPanel} this
134          */
135         "render" : true
136          
137         
138     });
139     
140
141     
142     
143     if(this.autoScroll){
144         this.resizeEl.setStyle("overflow", "auto");
145     } else {
146         // fix randome scrolling
147         this.el.on('scroll', function() {
148             Roo.log('fix random scolling');
149             this.scrollTo('top',0); 
150         });
151     }
152     content = content || this.content;
153     if(content){
154         this.setContent(content);
155     }
156     if(config && config.url){
157         this.setUrl(this.url, this.params, this.loadOnce);
158     }
159     
160     
161     
162     Roo.ContentPanel.superclass.constructor.call(this);
163     
164     if (this.view && typeof(this.view.xtype) != 'undefined') {
165         this.view.el = this.el.appendChild(document.createElement("div"));
166         this.view = Roo.factory(this.view); 
167         this.view.render  &&  this.view.render(false, '');  
168     }
169     
170     
171     this.fireEvent('render', this);
172 };
173
174 Roo.extend(Roo.ContentPanel, Roo.util.Observable, {
175     tabTip:'',
176     setRegion : function(region){
177         this.region = region;
178         if(region){
179            this.el.replaceClass("x-layout-inactive-content", "x-layout-active-content");
180         }else{
181            this.el.replaceClass("x-layout-active-content", "x-layout-inactive-content");
182         } 
183     },
184     
185     /**
186      * Returns the toolbar for this Panel if one was configured. 
187      * @return {Roo.Toolbar} 
188      */
189     getToolbar : function(){
190         return this.toolbar;
191     },
192     
193     setActiveState : function(active){
194         this.active = active;
195         if(!active){
196             this.fireEvent("deactivate", this);
197         }else{
198             this.fireEvent("activate", this);
199         }
200     },
201     /**
202      * Updates this panel's element
203      * @param {String} content The new content
204      * @param {Boolean} loadScripts (optional) true to look for and process scripts
205     */
206     setContent : function(content, loadScripts){
207         this.el.update(content, loadScripts);
208     },
209
210     ignoreResize : function(w, h){
211         if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
212             return true;
213         }else{
214             this.lastSize = {width: w, height: h};
215             return false;
216         }
217     },
218     /**
219      * Get the {@link Roo.UpdateManager} for this panel. Enables you to perform Ajax updates.
220      * @return {Roo.UpdateManager} The UpdateManager
221      */
222     getUpdateManager : function(){
223         return this.el.getUpdateManager();
224     },
225      /**
226      * Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use {@link #setUrl}.
227      * @param {Object/String/Function} url The url for this request or a function to call to get the url or a config object containing any of the following options:
228 <pre><code>
229 panel.load({
230     url: "your-url.php",
231     params: {param1: "foo", param2: "bar"}, // or a URL encoded string
232     callback: yourFunction,
233     scope: yourObject, //(optional scope)
234     discardUrl: false,
235     nocache: false,
236     text: "Loading...",
237     timeout: 30,
238     scripts: false
239 });
240 </code></pre>
241      * The only required property is <i>url</i>. The optional properties <i>nocache</i>, <i>text</i> and <i>scripts</i>
242      * are shorthand for <i>disableCaching</i>, <i>indicatorText</i> and <i>loadScripts</i> and are used to set their associated property on this panel UpdateManager instance.
243      * @param {String/Object} params (optional) The parameters to pass as either a URL encoded string "param1=1&amp;param2=2" or an object {param1: 1, param2: 2}
244      * @param {Function} callback (optional) Callback when transaction is complete -- called with signature (oElement, bSuccess, oResponse)
245      * @param {Boolean} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used URL. If true, it will not store the URL.
246      * @return {Roo.ContentPanel} this
247      */
248     load : function(){
249         var um = this.el.getUpdateManager();
250         um.update.apply(um, arguments);
251         return this;
252     },
253
254
255     /**
256      * Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded from that URL.
257      * @param {String/Function} url The URL to load the content from or a function to call to get the URL
258      * @param {String/Object} params (optional) The string params for the update call or an object of the params. See {@link Roo.UpdateManager#update} for more details. (Defaults to null)
259      * @param {Boolean} loadOnce (optional) Whether to only load the content once. If this is false it makes the Ajax call every time this panel is activated. (Defaults to false)
260      * @return {Roo.UpdateManager} The UpdateManager
261      */
262     setUrl : function(url, params, loadOnce){
263         if(this.refreshDelegate){
264             this.removeListener("activate", this.refreshDelegate);
265         }
266         this.refreshDelegate = this._handleRefresh.createDelegate(this, [url, params, loadOnce]);
267         this.on("activate", this.refreshDelegate);
268         return this.el.getUpdateManager();
269     },
270     
271     _handleRefresh : function(url, params, loadOnce){
272         if(!loadOnce || !this.loaded){
273             var updater = this.el.getUpdateManager();
274             updater.update(url, params, this._setLoaded.createDelegate(this));
275         }
276     },
277     
278     _setLoaded : function(){
279         this.loaded = true;
280     }, 
281     
282     /**
283      * Returns this panel's id
284      * @return {String} 
285      */
286     getId : function(){
287         return this.el.id;
288     },
289     
290     /** 
291      * Returns this panel's element - used by regiosn to add.
292      * @return {Roo.Element} 
293      */
294     getEl : function(){
295         return this.wrapEl || this.el;
296     },
297     
298     adjustForComponents : function(width, height)
299     {
300         //Roo.log('adjustForComponents ');
301         if(this.resizeEl != this.el){
302             width -= this.el.getFrameWidth('lr');
303             height -= this.el.getFrameWidth('tb');
304         }
305         if(this.toolbar){
306             var te = this.toolbar.getEl();
307             height -= te.getHeight();
308             te.setWidth(width);
309         }
310         if(this.footer){
311             var te = this.footer.getEl();
312             //Roo.log("footer:" + te.getHeight());
313             
314             height -= te.getHeight();
315             te.setWidth(width);
316         }
317         
318         
319         if(this.adjustments){
320             width += this.adjustments[0];
321             height += this.adjustments[1];
322         }
323         return {"width": width, "height": height};
324     },
325     
326     setSize : function(width, height){
327         if(this.fitToFrame && !this.ignoreResize(width, height)){
328             if(this.fitContainer && this.resizeEl != this.el){
329                 this.el.setSize(width, height);
330             }
331             var size = this.adjustForComponents(width, height);
332             this.resizeEl.setSize(this.autoWidth ? "auto" : size.width, this.autoHeight ? "auto" : size.height);
333             this.fireEvent('resize', this, size.width, size.height);
334         }
335     },
336     
337     /**
338      * Returns this panel's title
339      * @return {String} 
340      */
341     getTitle : function(){
342         return this.title;
343     },
344     
345     /**
346      * Set this panel's title
347      * @param {String} title
348      */
349     setTitle : function(title){
350         this.title = title;
351         if(this.region){
352             this.region.updatePanelTitle(this, title);
353         }
354     },
355     
356     /**
357      * Returns true is this panel was configured to be closable
358      * @return {Boolean} 
359      */
360     isClosable : function(){
361         return this.closable;
362     },
363     
364     beforeSlide : function(){
365         this.el.clip();
366         this.resizeEl.clip();
367     },
368     
369     afterSlide : function(){
370         this.el.unclip();
371         this.resizeEl.unclip();
372     },
373     
374     /**
375      *   Force a content refresh from the URL specified in the {@link #setUrl} method.
376      *   Will fail silently if the {@link #setUrl} method has not been called.
377      *   This does not activate the panel, just updates its content.
378      */
379     refresh : function(){
380         if(this.refreshDelegate){
381            this.loaded = false;
382            this.refreshDelegate();
383         }
384     },
385     
386     /**
387      * Destroys this panel
388      */
389     destroy : function(){
390         this.el.removeAllListeners();
391         var tempEl = document.createElement("span");
392         tempEl.appendChild(this.el.dom);
393         tempEl.innerHTML = "";
394         this.el.remove();
395         this.el = null;
396     },
397     
398     /**
399      * form - if the content panel contains a form - this is a reference to it.
400      * @type {Roo.form.Form}
401      */
402     form : false,
403     /**
404      * view - if the content panel contains a view (Roo.DatePicker / Roo.View / Roo.JsonView)
405      *    This contains a reference to it.
406      * @type {Roo.View}
407      */
408     view : false,
409     
410       /**
411      * Adds a xtype elements to the panel - currently only supports Forms, View, JsonView.
412      * <pre><code>
413
414 layout.addxtype({
415        xtype : 'Form',
416        items: [ .... ]
417    }
418 );
419
420 </code></pre>
421      * @param {Object} cfg Xtype definition of item to add.
422      */
423     
424     addxtype : function(cfg) {
425         // add form..
426         if (cfg.xtype.match(/^Form$/)) {
427             
428             var el;
429             //if (this.footer) {
430             //    el = this.footer.container.insertSibling(false, 'before');
431             //} else {
432                 el = this.el.createChild();
433             //}
434
435             this.form = new  Roo.form.Form(cfg);
436             
437             
438             if ( this.form.allItems.length) {
439                 this.form.render(el.dom);
440             }
441             return this.form;
442         }
443         // should only have one of theses..
444         if ([ 'View', 'JsonView', 'DatePicker'].indexOf(cfg.xtype) > -1) {
445             // views.. should not be just added - used named prop 'view''
446             
447             cfg.el = this.el.appendChild(document.createElement("div"));
448             // factory?
449             
450             var ret = new Roo.factory(cfg);
451              
452              ret.render && ret.render(false, ''); // render blank..
453             this.view = ret;
454             return ret;
455         }
456         return false;
457     }
458 });
459
460 /**
461  * @class Roo.GridPanel
462  * @extends Roo.ContentPanel
463  * @constructor
464  * Create a new GridPanel.
465  * @param {Roo.grid.Grid} grid The grid for this panel
466  * @param {String/Object} config A string to set only the panel's title, or a config object
467  */
468 Roo.GridPanel = function(grid, config){
469     
470   
471     this.wrapper = Roo.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue
472         {tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true);
473         
474     this.wrapper.dom.appendChild(grid.getGridEl().dom);
475     
476     Roo.GridPanel.superclass.constructor.call(this, this.wrapper, config);
477     
478     if(this.toolbar){
479         this.toolbar.el.insertBefore(this.wrapper.dom.firstChild);
480     }
481     // xtype created footer. - not sure if will work as we normally have to render first..
482     if (this.footer && !this.footer.el && this.footer.xtype) {
483         
484         this.footer.container = this.grid.getView().getFooterPanel(true);
485         this.footer.dataSource = this.grid.dataSource;
486         this.footer = Roo.factory(this.footer, Roo);
487         
488     }
489     
490     grid.monitorWindowResize = false; // turn off autosizing
491     grid.autoHeight = false;
492     grid.autoWidth = false;
493     this.grid = grid;
494     this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel");
495 };
496
497 Roo.extend(Roo.GridPanel, Roo.ContentPanel, {
498     getId : function(){
499         return this.grid.id;
500     },
501     
502     /**
503      * Returns the grid for this panel
504      * @return {Roo.grid.Grid} 
505      */
506     getGrid : function(){
507         return this.grid;    
508     },
509     
510     setSize : function(width, height){
511         if(!this.ignoreResize(width, height)){
512             var grid = this.grid;
513             var size = this.adjustForComponents(width, height);
514             grid.getGridEl().setSize(size.width, size.height);
515             grid.autoSize();
516         }
517     },
518     
519     beforeSlide : function(){
520         this.grid.getView().scroller.clip();
521     },
522     
523     afterSlide : function(){
524         this.grid.getView().scroller.unclip();
525     },
526     
527     destroy : function(){
528         this.grid.destroy();
529         delete this.grid;
530         Roo.GridPanel.superclass.destroy.call(this); 
531     }
532 });
533
534
535 /**
536  * @class Roo.NestedLayoutPanel
537  * @extends Roo.ContentPanel
538  * @constructor
539  * Create a new NestedLayoutPanel.
540  * 
541  * 
542  * @param {Roo.BorderLayout} layout The layout for this panel
543  * @param {String/Object} config A string to set only the title or a config object
544  */
545 Roo.NestedLayoutPanel = function(layout, config)
546 {
547     // construct with only one argument..
548     /* FIXME - implement nicer consturctors
549     if (layout.layout) {
550         config = layout;
551         layout = config.layout;
552         delete config.layout;
553     }
554     if (layout.xtype && !layout.getEl) {
555         // then layout needs constructing..
556         layout = Roo.factory(layout, Roo);
557     }
558     */
559     
560     
561     Roo.NestedLayoutPanel.superclass.constructor.call(this, layout.getEl(), config);
562     
563     layout.monitorWindowResize = false; // turn off autosizing
564     this.layout = layout;
565     this.layout.getEl().addClass("x-layout-nested-layout");
566     
567     
568     
569     
570 };
571
572 Roo.extend(Roo.NestedLayoutPanel, Roo.ContentPanel, {
573
574     setSize : function(width, height){
575         if(!this.ignoreResize(width, height)){
576             var size = this.adjustForComponents(width, height);
577             var el = this.layout.getEl();
578             el.setSize(size.width, size.height);
579             var touch = el.dom.offsetWidth;
580             this.layout.layout();
581             // ie requires a double layout on the first pass
582             if(Roo.isIE && !this.initialized){
583                 this.initialized = true;
584                 this.layout.layout();
585             }
586         }
587     },
588     
589     // activate all subpanels if not currently active..
590     
591     setActiveState : function(active){
592         this.active = active;
593         if(!active){
594             this.fireEvent("deactivate", this);
595             return;
596         }
597         
598         this.fireEvent("activate", this);
599         // not sure if this should happen before or after..
600         if (!this.layout) {
601             return; // should not happen..
602         }
603         var reg = false;
604         for (var r in this.layout.regions) {
605             reg = this.layout.getRegion(r);
606             if (reg.getActivePanel()) {
607                 //reg.showPanel(reg.getActivePanel()); // force it to activate.. 
608                 reg.setActivePanel(reg.getActivePanel());
609                 continue;
610             }
611             if (!reg.panels.length) {
612                 continue;
613             }
614             reg.showPanel(reg.getPanel(0));
615         }
616         
617         
618         
619         
620     },
621     
622     /**
623      * Returns the nested BorderLayout for this panel
624      * @return {Roo.BorderLayout} 
625      */
626     getLayout : function(){
627         return this.layout;
628     },
629     
630      /**
631      * Adds a xtype elements to the layout of the nested panel
632      * <pre><code>
633
634 panel.addxtype({
635        xtype : 'ContentPanel',
636        region: 'west',
637        items: [ .... ]
638    }
639 );
640
641 panel.addxtype({
642         xtype : 'NestedLayoutPanel',
643         region: 'west',
644         layout: {
645            center: { },
646            west: { }   
647         },
648         items : [ ... list of content panels or nested layout panels.. ]
649    }
650 );
651 </code></pre>
652      * @param {Object} cfg Xtype definition of item to add.
653      */
654     addxtype : function(cfg) {
655         return this.layout.addxtype(cfg);
656     
657     }
658 });
659
660 Roo.ScrollPanel = function(el, config, content){
661     config = config || {};
662     config.fitToFrame = true;
663     Roo.ScrollPanel.superclass.constructor.call(this, el, config, content);
664     
665     this.el.dom.style.overflow = "hidden";
666     var wrap = this.el.wrap({cls: "x-scroller x-layout-inactive-content"});
667     this.el.removeClass("x-layout-inactive-content");
668     this.el.on("mousewheel", this.onWheel, this);
669
670     var up = wrap.createChild({cls: "x-scroller-up", html: "&#160;"}, this.el.dom);
671     var down = wrap.createChild({cls: "x-scroller-down", html: "&#160;"});
672     up.unselectable(); down.unselectable();
673     up.on("click", this.scrollUp, this);
674     down.on("click", this.scrollDown, this);
675     up.addClassOnOver("x-scroller-btn-over");
676     down.addClassOnOver("x-scroller-btn-over");
677     up.addClassOnClick("x-scroller-btn-click");
678     down.addClassOnClick("x-scroller-btn-click");
679     this.adjustments = [0, -(up.getHeight() + down.getHeight())];
680
681     this.resizeEl = this.el;
682     this.el = wrap; this.up = up; this.down = down;
683 };
684
685 Roo.extend(Roo.ScrollPanel, Roo.ContentPanel, {
686     increment : 100,
687     wheelIncrement : 5,
688     scrollUp : function(){
689         this.resizeEl.scroll("up", this.increment, {callback: this.afterScroll, scope: this});
690     },
691
692     scrollDown : function(){
693         this.resizeEl.scroll("down", this.increment, {callback: this.afterScroll, scope: this});
694     },
695
696     afterScroll : function(){
697         var el = this.resizeEl;
698         var t = el.dom.scrollTop, h = el.dom.scrollHeight, ch = el.dom.clientHeight;
699         this.up[t == 0 ? "addClass" : "removeClass"]("x-scroller-btn-disabled");
700         this.down[h - t <= ch ? "addClass" : "removeClass"]("x-scroller-btn-disabled");
701     },
702
703     setSize : function(){
704         Roo.ScrollPanel.superclass.setSize.apply(this, arguments);
705         this.afterScroll();
706     },
707
708     onWheel : function(e){
709         var d = e.getWheelDelta();
710         this.resizeEl.dom.scrollTop -= (d*this.wheelIncrement);
711         this.afterScroll();
712         e.stopEvent();
713     },
714
715     setContent : function(content, loadScripts){
716         this.resizeEl.update(content, loadScripts);
717     }
718
719 });
720
721
722
723 /**
724  * @class Roo.TreePanel
725  * @extends Roo.ContentPanel
726  * Treepanel component
727  * 
728  * @constructor
729  * Create a new TreePanel. - defaults to fit/scoll contents.
730  * @param {String/Object} config A string to set only the panel's title, or a config object
731  */
732 Roo.TreePanel = function(config){
733     var el = config.el;
734     var tree = config.tree;
735     delete config.tree; 
736     delete config.el; // hopefull!
737     
738     // wrapper for IE7 strict & safari scroll issue
739     
740     var treeEl = el.createChild();
741     config.resizeEl = treeEl;
742     
743     
744     
745     Roo.TreePanel.superclass.constructor.call(this, el, config);
746  
747  
748     this.tree = new Roo.tree.TreePanel(treeEl , tree);
749     //console.log(tree);
750     this.on('activate', function()
751     {
752         if (this.tree.rendered) {
753             return;
754         }
755         //console.log('render tree');
756         this.tree.render();
757     });
758     // this should not be needed.. - it's actually the 'el' that resizes?
759     // actuall it breaks the containerScroll - dragging nodes auto scroll at top
760     
761     //this.on('resize',  function (cp, w, h) {
762     //        this.tree.innerCt.setWidth(w);
763     //        this.tree.innerCt.setHeight(h);
764     //        //this.tree.innerCt.setStyle('overflow-y', 'auto');
765     //});
766
767         
768     
769 };
770
771 Roo.extend(Roo.TreePanel, Roo.ContentPanel, {   
772     fitToFrame : true,
773     autoScroll : true,
774     /*
775      * @cfg {Roo.tree.TreePanel} tree The tree TreePanel, with config etc.
776      */
777     tree : false
778
779 });
780
781
782
783
784
785
786
787
788
789
790