aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-03-09 15:25:36 +0000
committerstuconnolly <stuart02@gmail.com>2010-03-09 15:25:36 +0000
commit2e77b3e6b1064403c8518d4c6bae6be8a7cdd3de (patch)
tree09a1bdac4daddb818a590b684a320bc9b529d064
parent6560b2e188308d41d16c1e5d8c5b3bc05dbae8fe (diff)
downloadsequelpro-2e77b3e6b1064403c8518d4c6bae6be8a7cdd3de.tar.gz
sequelpro-2e77b3e6b1064403c8518d4c6bae6be8a7cdd3de.tar.bz2
sequelpro-2e77b3e6b1064403c8518d4c6bae6be8a7cdd3de.zip
Fix an exception in the user manager caused by sorting the users list by making the user manager KVO compliant for the sort descriptors array. Also, add a bunch of comments and general tidy up on SPUserManager.m.
-rw-r--r--Interfaces/English.lproj/UserManagerView.xib45
-rw-r--r--Source/SPUserManager.h8
-rw-r--r--Source/SPUserManager.m176
3 files changed, 147 insertions, 82 deletions
diff --git a/Interfaces/English.lproj/UserManagerView.xib b/Interfaces/English.lproj/UserManagerView.xib
index cd7a2ab2..36c8dd39 100644
--- a/Interfaces/English.lproj/UserManagerView.xib
+++ b/Interfaces/English.lproj/UserManagerView.xib
@@ -21,7 +21,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="744"/>
+ <integer value="31"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -99,7 +99,7 @@
<object class="_NSCornerView" key="NSCornerView" id="1005712676">
<reference key="NSNextResponder" ref="848314643"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{-26, 0}, {16, 17}}</string>
+ <string key="NSFrame">{{183, 0}, {12, 17}}</string>
<reference key="NSSuperview" ref="848314643"/>
</object>
<object class="NSMutableArray" key="NSTableColumns">
@@ -134,7 +134,7 @@
</object>
<object class="NSTextFieldCell" key="NSDataCell" id="984683345">
<int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">2048</int>
+ <int key="NSCellFlags2">2304</int>
<string key="NSContents">Text Cell</string>
<object class="NSFont" key="NSSupport" id="746597359">
<string key="NSName">LucidaGrande</string>
@@ -212,21 +212,22 @@
<object class="NSScroller" id="710626046">
<reference key="NSNextResponder" ref="848314643"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{246, 17}, {15, 308}}</string>
+ <string key="NSFrame">{{183, 17}, {11, 456}}</string>
<reference key="NSSuperview" ref="848314643"/>
+ <int key="NSsFlags">256</int>
<reference key="NSTarget" ref="848314643"/>
<string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99690401554107666</double>
+ <double key="NSPercent">0.96487605571746826</double>
</object>
<object class="NSScroller" id="851800246">
<reference key="NSNextResponder" ref="848314643"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{1, 325}, {245, 15}}</string>
+ <string key="NSFrame">{{0, 473}, {183, 11}}</string>
<reference key="NSSuperview" ref="848314643"/>
- <int key="NSsFlags">1</int>
+ <int key="NSsFlags">257</int>
<reference key="NSTarget" ref="848314643"/>
<string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99616861343383789</double>
+ <double key="NSPercent">0.99487179517745972</double>
</object>
<object class="NSClipView" id="283216473">
<reference key="NSNextResponder" ref="848314643"/>
@@ -434,7 +435,7 @@
<object class="NSTabViewItem" id="820796939">
<string key="NSIdentifier">General</string>
<object class="NSView" key="NSView" id="143215913">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder" ref="716372522"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -563,6 +564,7 @@
</object>
</object>
<string key="NSFrame">{{10, 33}, {511, 414}}</string>
+ <reference key="NSSuperview" ref="716372522"/>
</object>
<string key="NSLabel">General</string>
<reference key="NSColor" ref="409859189"/>
@@ -1396,7 +1398,7 @@
<object class="NSTabViewItem" id="487249930">
<string key="NSIdentifier">Schema Privileges</string>
<object class="NSView" key="NSView" id="601698335">
- <reference key="NSNextResponder" ref="716372522"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1841,7 +1843,6 @@
</object>
</object>
<string key="NSFrame">{{10, 33}, {511, 414}}</string>
- <reference key="NSSuperview" ref="716372522"/>
</object>
<string key="NSLabel">Schema Privileges</string>
<reference key="NSColor" ref="409859189"/>
@@ -2118,13 +2119,13 @@
<reference key="NSTabView" ref="716372522"/>
</object>
</object>
- <reference key="NSSelectedTabViewItem" ref="487249930"/>
+ <reference key="NSSelectedTabViewItem" ref="820796939"/>
<reference key="NSFont" ref="746597359"/>
<int key="NSTvFlags">0</int>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="601698335"/>
+ <reference ref="143215913"/>
</object>
</object>
<object class="NSButton" id="445730006">
@@ -4188,11 +4189,6 @@
<reference key="parent" ref="848314643"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">578</int>
- <reference key="object" ref="98886535"/>
- <reference key="parent" ref="848314643"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">579</int>
<reference key="object" ref="623571747"/>
<object class="NSMutableArray" key="children">
@@ -5279,6 +5275,11 @@
<reference key="object" ref="847011406"/>
<reference key="parent" ref="832112691"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">923</int>
+ <reference key="object" ref="98886535"/>
+ <reference key="parent" ref="848314643"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -5398,7 +5399,6 @@
<string>544.IBPluginDependency</string>
<string>545.IBNumberFormatterLocalizesFormatMetadataKey</string>
<string>545.IBPluginDependency</string>
- <string>578.IBPluginDependency</string>
<string>579.IBPluginDependency</string>
<string>580.IBAttributePlaceholdersKey</string>
<string>580.IBPluginDependency</string>
@@ -5483,11 +5483,11 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{434, 346}, {752, 506}}</string>
+ <string>{{240, 174}, {752, 506}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO"/>
<boolean value="NO"/>
- <string>{{434, 346}, {752, 506}}</string>
+ <string>{{240, 174}, {752, 506}}</string>
<boolean value="NO"/>
<boolean value="YES"/>
<string>{752, 506}</string>
@@ -5578,7 +5578,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">ToolTip</string>
@@ -5667,7 +5666,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">922</int>
+ <int key="maxID">923</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h
index 0bcc82bd..86c19664 100644
--- a/Source/SPUserManager.h
+++ b/Source/SPUserManager.h
@@ -55,10 +55,13 @@
IBOutlet NSTextField *userNameTextField;
IBOutlet BWAnchoredButtonBar *splitViewButtonBar;
-
+
NSMutableArray *schemas;
NSMutableArray *grantedSchemaPrivs;
NSMutableArray *availablePrivs;
+
+ NSArray *treeSortDescriptors;
+ NSSortDescriptor *treeSortDescriptor;
}
@property (nonatomic, retain) MCPConnection *mySqlConnection;
@@ -67,6 +70,7 @@
@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain) NSMutableDictionary *privsSupportedByServer;
+@property (nonatomic, retain) NSArray *treeSortDescriptors;
@property (nonatomic, retain) NSMutableArray *schemas;
@property (nonatomic, retain) NSMutableArray *grantedSchemaPrivs;
@property (nonatomic, retain) NSMutableArray *availablePrivs;
@@ -99,6 +103,4 @@
- (BOOL)grantPrivilegesToUser:(NSManagedObject *)user;
- (BOOL)grantDbPrivilegesWithPrivilege:(NSManagedObject *)user;
-- (NSArray *)treeSortDescriptors;
-
@end
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 0cc2b125..9ce7e5d4 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -62,6 +62,7 @@
@synthesize schemas;
@synthesize grantedSchemaPrivs;
@synthesize availablePrivs;
+@synthesize treeSortDescriptors;
- (id)init
{
@@ -88,27 +89,6 @@
return self;
}
-/**
- * Dealloc. Get rid of everything.
- */
-- (void)dealloc
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSManagedObjectContextDidSaveNotification
- object:nil];
- [managedObjectContext release];
- [persistentStoreCoordinator release];
- [managedObjectModel release];
- [privColumnToGrantMap release];
- [mySqlConnection release];
- [privsSupportedByServer release];
- [schemas release];
- [availablePrivs release];
- [grantedSchemaPrivs release];
-
- [super dealloc];
-}
-
/**
* UI specific items to set up when the window loads. This is different than awakeFromNib
* as it's only called once.
@@ -128,6 +108,11 @@
[self _initializeUsers];
[self _initializeSchemaPrivs];
+
+ treeSortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"displayName" ascending:YES];
+
+ [self setTreeSortDescriptors:[NSArray arrayWithObject:treeSortDescriptor]];
+
[super windowDidLoad];
}
@@ -193,11 +178,12 @@
isInitializing = FALSE;
}
+/**
+ * Initialize the outline view tree. The NSOutlineView gets it's data from a NSTreeController which gets
+ * it's data from the SPUser Entity objects in the current managedObjectContext.
+ */
- (void)_initializeTree:(NSArray *)items
-{
- // The NSOutlineView gets it's data from a NSTreeController which gets
- // it's data from the SPUser Entity objects in the current managedObjectContext.
-
+{
// Go through each item that contains a dictionary of key-value pairs
// for each user currently in the database.
for(NSInteger i = 0; i < [items count]; i++)
@@ -243,12 +229,16 @@
}
[parentResults release];
}
+
// Reload data of the outline view with the changes.
[outlineView reloadData];
[treeController rearrangeObjects];
}
-- (void) _initializeAvailablePrivs
+/**
+ * Initialize the available user privileges.
+ */
+- (void)_initializeAvailablePrivs
{
// Initialize available privileges
NSManagedObjectContext *moc = self.managedObjectContext;
@@ -256,6 +246,7 @@
inManagedObjectContext:moc];
NSArray *props = [privEntityDescription attributeKeys];
[availablePrivs removeAllObjects];
+
for (NSString *prop in props)
{
if ([prop hasSuffix:@"_priv"] && [[self.privsSupportedByServer objectForKey:prop] boolValue])
@@ -266,25 +257,31 @@
}
}
+
[availableController rearrangeObjects];
-
}
+
+/**
+ * Initialize the available schema privileges.
+ */
- (void)_initializeSchemaPrivs
{
// Initialize Databases
MCPResult *results = [self.mySqlConnection listDBs];
+
if ([results numOfRows]) {
[results dataSeek:0];
}
+
for (int i = 0; i < [results numOfRows]; i++) {
[schemas addObject:[results fetchRowAsDictionary]];
}
- [schemaController rearrangeObjects];
- [self _initializeAvailablePrivs];
-
+ [schemaController rearrangeObjects];
+ [self _initializeAvailablePrivs];
}
+
/**
* Set NSManagedObject with values from the passed in dictionary.
*/
@@ -325,6 +322,9 @@
}
}
+/**
+ * Initialize the schema privileges for the supplied child object.
+ */
- (void)_initializeSchemaPrivsForChild:(NSManagedObject *)child
{
// Assumes that the child has already been initialized with values from the
@@ -361,7 +361,6 @@
NSMutableSet *privs = [child mutableSetValueForKey:@"schema_privileges"];
[privs addObject:dbPriv];
}
-
}
/**
@@ -531,13 +530,6 @@
return YES;
}
-- (NSArray *)treeSortDescriptors
-{
- NSSortDescriptor *descriptor = [[[NSSortDescriptor alloc] initWithKey:@"displayName" ascending:YES] autorelease];
-
- return [NSArray arrayWithObject:descriptor];
-}
-
#pragma mark -
#pragma mark General IBAction methods
@@ -614,9 +606,11 @@
@catch (NSException * e) {
}
}
-
}
+/**
+ * Adds a new user to the current database.
+ */
- (IBAction)addUser:(id)sender
{
// Adds a new SPUser objects to the managedObjectContext and sets default values
@@ -636,6 +630,9 @@
[[self window] makeFirstResponder:userNameTextField];
}
+/**
+ * Removes the currently selected user from the current database.
+ */
- (IBAction)removeUser:(id)sender
{
NSString *username = [[[treeController selectedObjects] objectAtIndex:0]
@@ -646,9 +643,13 @@
{
[child setPrimitiveValue:username forKey:@"user"];
}
+
[treeController remove:sender];
}
+/**
+ * Adds a new host to the currently selected user.
+ */
- (IBAction)addHost:(id)sender
{
if ([[treeController selectedObjects] count] > 0)
@@ -658,6 +659,7 @@
[self _selectParentFromSelection];
}
}
+
[treeController addChild:sender];
// The newly added item will be selected as it is added, but only after the next iteration of the
@@ -665,12 +667,17 @@
[self performSelector:@selector(editNewHost) withObject:nil afterDelay:0.1];
}
-// Perform a deferred edit of the currently selected row.
+/**
+ * Perform a deferred edit of the currently selected row.
+ */
- (void)editNewHost
{
[outlineView editColumn:0 row:[outlineView selectedRow] withEvent:nil select:TRUE];
}
+/**
+ * Removes the currently selected host from it's parent user.
+ */
- (IBAction)removeHost:(id)sender
{
// Set the username on the child so that it's accessabile when building
@@ -679,6 +686,7 @@
NSManagedObject *parent = [child valueForKey:@"parent"];
[child setPrimitiveValue:[[child valueForKey:@"parent"] valueForKey:@"user"] forKey:@"user"];
[treeController remove:sender];
+
if ([[parent valueForKey:@"children"] count] == 0)
{
NSAlert *alert = [NSAlert alertWithMessageText:@"User doesn't have any hosts."
@@ -690,6 +698,9 @@
}
}
+/**
+ * Adds a new schema privilege.
+ */
- (IBAction)addSchemaPriv:(id)sender
{
NSArray *selectedObjects = [availableController selectedObjects];
@@ -700,6 +711,9 @@
[self _setSchemaPrivValues:selectedObjects enabled:YES];
}
+/**
+ * Removes a schema privilege.
+ */
- (IBAction)removeSchemaPriv:(id)sender
{
NSArray *selectedObjects = [grantedController selectedObjects];
@@ -708,9 +722,11 @@
[grantedController removeObjects:selectedObjects];
[grantedTableView reloadData];
[self _setSchemaPrivValues:selectedObjects enabled:NO];
-
}
+/**
+ * Refreshes the current list of users.
+ */
- (IBAction)refresh:(id)sender
{
if ([self.managedObjectContext hasChanges])
@@ -720,18 +736,20 @@
alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
otherButton:nil
informativeTextWithFormat:@"Window has changes. All changes will be lost!"];
+
[alert setAlertStyle:NSWarningAlertStyle];
+
if ([alert runModal] == NSAlertAlternateReturn) // cancel
{
return;
}
}
+
[self.managedObjectContext reset];
[grantedSchemaPrivs removeAllObjects];
[grantedTableView reloadData];
[self _initializeAvailablePrivs];
[treeController fetch:nil];
-
}
- (void)_setSchemaPrivValues:(NSArray *)objects enabled:(BOOL)enabled
@@ -770,8 +788,8 @@
NSMutableSet *privs = [selectedHost mutableSetValueForKey:@"schema_privileges"];
[privs addObject:priv];
}
-
}
+
- (void)_clearData
{
[managedObjectContext reset];
@@ -779,6 +797,9 @@
managedObjectContext = nil;
}
+/**
+ * Menu item validation.
+ */
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
// Only allow removing hosts of a host node is selected.
@@ -881,7 +902,8 @@
- (BOOL)updateUsers:(NSArray *)updatedUsers
{
- for (NSManagedObject *user in updatedUsers) {
+ for (NSManagedObject *user in updatedUsers)
+ {
if ([[[user entity] name] isEqualToString:@"Privileges"])
{
[self grantDbPrivilegesWithPrivilege:user];
@@ -905,7 +927,6 @@
} else {
[self grantPrivilegesToUser:user];
}
-
}
return YES;
@@ -914,6 +935,7 @@
- (BOOL)deleteUsers:(NSArray *)deletedUsers
{
NSMutableString *droppedUsers = [NSMutableString string];
+
for (NSManagedObject *user in deletedUsers)
{
if (![[[user entity] name] isEqualToString:@"Privileges"] && [user valueForKey:@"host"] != nil)
@@ -924,9 +946,11 @@
}
}
+
droppedUsers = [[droppedUsers substringToIndex:[droppedUsers length]-2] mutableCopy];
[self.mySqlConnection queryString:[NSString stringWithFormat:@"DROP USER %@", droppedUsers]];
[droppedUsers release];
+
return TRUE;
}
@@ -966,14 +990,13 @@
if ([self checkAndDisplayMySqlError])
[self grantPrivilegesToUser:user];
}
-
}
+
return YES;
}
/**
- * Grant or revoke db privileges to the given user
- *
+ * Grant or revoke DB privileges for the supplied user.
*/
- (BOOL)grantDbPrivilegesWithPrivilege:(NSManagedObject *)schemaPriv
{
@@ -981,6 +1004,7 @@
NSMutableArray *revokePrivileges = [NSMutableArray array];
NSString *dbName = [schemaPriv valueForKey:@"db"];
+
for (NSString *key in self.privsSupportedByServer)
{
if (![key hasSuffix:@"_priv"]) continue;
@@ -997,6 +1021,7 @@
@catch (NSException * e) {
}
}
+
// Grant privileges
if ([grantPrivileges count] > 0)
{
@@ -1021,11 +1046,13 @@
DLog(@"%@", revokeStatement);
[self.mySqlConnection queryString:revokeStatement];
[self checkAndDisplayMySqlError];
- }
+ }
+
return TRUE;
}
+
/**
- * Grant or revoke privileges to the given user
+ * Grant or revoke privileges for the supplied user.
*/
- (BOOL)grantPrivilegesToUser:(NSManagedObject *)user
{
@@ -1052,6 +1079,7 @@
@catch (NSException * e) {
}
}
+
// Grant privileges
if ([grantPrivileges count] > 0)
{
@@ -1077,7 +1105,7 @@
}
}
- for(NSManagedObject *priv in [user valueForKey:@"schema_privileges"])
+ for (NSManagedObject *priv in [user valueForKey:@"schema_privileges"])
{
[self grantDbPrivilegesWithPrivilege:priv];
}
@@ -1085,8 +1113,10 @@
return TRUE;
}
-// Gets any NSManagedObject (SPUser) from the managedObjectContext that may
-// already exist with the given username.
+/**
+ * Gets any NSManagedObject (SPUser) from the managedObjectContext that may
+ * already exist with the given username.
+ */
- (NSArray *)_fetchUserWithUserName:(NSString *)username
{
NSManagedObjectContext *moc = [self managedObjectContext];
@@ -1100,6 +1130,7 @@
NSError *error = nil;
NSArray *array = [moc executeFetchRequest:request error:&error];
+
if (error != nil)
{
[[NSApplication sharedApplication] presentError:error];
@@ -1120,15 +1151,18 @@
NSError *error = nil;
NSArray *array = [moc executeFetchRequest:request error:&error];
+
if (error != nil)
{
[[NSApplication sharedApplication] presentError:error];
}
- return array;
+ return array;
}
-// Creates a new NSManagedObject and inserts it into the managedObjectContext.
+/**
+ * Creates a new NSManagedObject and inserts it into the managedObjectContext.
+ */
- (NSManagedObject *)_createNewSPUser
{
NSManagedObject *user = [NSEntityDescription insertNewObjectForEntityForName:@"SPUser"
@@ -1137,7 +1171,9 @@
return user;
}
-// Displays alert panel if there is an error condition currently on the mySqlConnection
+/**
+ * Displays an alert panel if there was an error condition on the MySQL connection.
+ */
- (BOOL)checkAndDisplayMySqlError
{
if (![[self.mySqlConnection getLastErrorMessage] isEqualToString:@""]) {
@@ -1208,14 +1244,18 @@
[grantedSchemaPrivs removeAllObjects];
[grantedTableView reloadData];
[self _initializeAvailablePrivs];
+
if ([[treeController selectedObjects] count] > 0 && [[schemaController selectedObjects] count] > 0) {
NSManagedObject *user = [[treeController selectedObjects] objectAtIndex:0];
+
// Check to see if the user host node was selected
if ([user valueForKey:@"host"]) {
NSString *selectedSchema = [[[schemaController selectedObjects] objectAtIndex:0] valueForKey:@"Database"];
NSArray *results = [self _fetchPrivsWithUser:[[user parent] valueForKey:@"user"] schema:selectedSchema host:[user valueForKey:@"host"]];
+
if ([results count] > 0) {
NSManagedObject *priv = [results objectAtIndex:0];
+
for (NSPropertyDescription *property in [priv entity])
{
if ([[property name] hasSuffix:@"_priv"] && [[priv valueForKey:[property name]] boolValue])
@@ -1266,4 +1306,28 @@
}
}
+#pragma mark -
+
+/**
+ * Dealloc. Get rid of everything.
+ */
+- (void)dealloc
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSManagedObjectContextDidSaveNotification
+ object:nil];
+ [managedObjectContext release];
+ [persistentStoreCoordinator release];
+ [managedObjectModel release];
+ [privColumnToGrantMap release];
+ [mySqlConnection release];
+ [privsSupportedByServer release];
+ [schemas release];
+ [availablePrivs release];
+ [grantedSchemaPrivs release];
+ [treeSortDescriptor release];
+
+ [super dealloc];
+}
+
@end
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645